Forum: Ruby on Rails rake db:migrate - doing nothing to the database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Josh P. (Guest)
on 2007-02-16 21:30
when I do the rake db:migrate, with a migration file that is supposed to
add 3 records to the database, it ends up doing nothing to the database
at all.  here is what happens when I type in:  "rake db:migrate --trace"

(in C:/InstantRails/rails_apps/work/depot)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump

And then it's back to the command prompt.  Any suggestions as to why it
is doing nothing?
Josh P. (Guest)
on 2007-02-16 21:56
Alright, I made a new migration file, with the same code, and it works
now.  So my new question is this:

If I make a migration file, and then do a rake db:migrate, and then I
want to change one of the migration files, how can I do that?

It seems that once I've done the rake db:migrate, it does not recognize
any changes to the migration files that are there.
Jason R. (Guest)
on 2007-02-16 22:05
(Received via mailing list)
In that case, your database was already at the highest schema. When you
added a new migration, db:migrate saw a migration with a higher version
number and processed it (Migrate creates a schema_info table in your
Read up on migrations here:

rogerdpack (Guest)
on 2007-02-16 23:15
(Received via mailing list)
yeah you can either
1) change migrations, then migrate 'down' then up
2) add a new migration that changes the schema (better -- you can
rename tables, etc.)

On Feb 16, 12:56 pm, "Josh P." <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.