On Thu, Jun 5, 2008 at 11:07 AM, Leonel Freire <
[EMAIL PROTECTED]> wrote:

>
> I'm having problems (acctually diferences) in the generated databases by
> Rails. Here's my database.yaml:
> ...
> After applying the migrations I have:
>
> mysql> use gemarco_development;
> Database changed
> mysql> describe creditos;
> +-------+---------------+------+-----+---------+----------------+
> | Field | Type          | Null | Key | Default | Extra          |
> +-------+---------------+------+-----+---------+----------------+
> | id    | int(11)       | NO   | PRI | NULL    | auto_increment |
> | valor | decimal(10,0) | YES  |     | NULL    |                |
> +-------+---------------+------+-----+---------+----------------+
> 2 rows in set (0.00 sec)
>
> That's OK for me. decimal(10,0) is what I was expecting. But the same
> isn't true for the test database:
>
> mysql> use gemarco_test;
> Database changed
> mysql> describe creditos;
> +-------+------------+------+-----+---------+----------------+
> | Field | Type       | Null | Key | Default | Extra          |
> +-------+------------+------+-----+---------+----------------+
> | id    | int(11)    | NO   | PRI | NULL    | auto_increment |
> | valor | bigint(10) | YES  |     | NULL    |                |
> +-------+------------+------+-----+---------+----------------+
> 2 rows in set (0.01 sec)
>
> It's showing bigint(10).


I assume you ran the migration by running rake db:migrate.  This only
affects the development environment unless you specify the RAILS_ENV
environment value to override it.  (rake RAILS_ENV=test db:migrate)

But you can also use rake db:test:prepare to copy the schema of the
development environment from the development database to the test database.


-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to