Question

If I have two migration files:

20110414132423_insert_bulk_data.rb #1st
20111122105951_add_some_columns.rb #2nd

and I run rake db:migrate, is the 1st one run firstly since it has older timestamp??

Since I am in the middle of someone else's code, he made the 20110414132423_insert_bulk_data migration which insert data to table, but this migration file complains an unknown column in the table, then I found the missing column is defined in the 2nd 20111122105951_add_some_columns.rb migration file which has newer timestamp...

How can I get rid of this?

Was it helpful?

Solution

Shortly, yes. The timestamp is used to order migrations and to navigate between them. See more here

OTHER TIPS

  1. delete this migrations
  2. generate two new migrations in the way you need to run
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top