0

I'm following a Rails Tutorial at RailsTutorial.org. When Trying to use rake to migrate the database I get an error.

$ rake db:migrate

I get this error:

rake aborted!
Multiple migrations have the version number 20110523144707

I'm not sure if this is relevant or not: I have made changes to the database on different days resulting in varying timestamps being applied to the filenames. I'm not sure if I have to rollback, rename, or delete particular files.

In my db/migrate folder I have: 4 total files, 3 of which have varying timestamp prefixes. I'm assuming this is where my problem stems :) See below:

20110523144707_add_email_uniqueness_index.rb
20110523144707_create_users.rb
20110523182459_add_email_uniqueness_index.rb
20110524121853_add_password_to_users.rb

1 Answer 1

1

Sounds like two or more db migration files begin with '20110523144707' in their filenames.

Try to rename the filename for one of the files in the db/migrate folder. Every filename needs to be unique. When you sort the filenames, they should sort in the same order in which the db migrations should run.

So name the files so that they sort in the correct order.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.