On Feb 22, 3:48 pm, Phlip <[email protected]> wrote:
> Hello Guy wrote:
> > thanks, i know, in test database are not tables. my question is: why are
> > not
> > the tables for test database create?
> > i did database migration and it creates only tables for development
> > database but
> > not for my test database. where can be the problem?
>
> I find the rake db:migrate commands to be less than comprehensive here.
> Sometimes one rake command understands testing, but another one does not.
>
If you run
rake
to run your unit tests, that should clone the structure from the
development database to the test one.
Fred
> In this case, I always find myself entering:
>
> rake RAILS_ENV=test db:migrate
>
> That uses rake's ability to push its command line options with = into
> environmental variables. Then the migrator uses the test: version in
> database.yml.
>
> Also try db:reset, or db:migrate:reset.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---