Ruby on Rails Friday, October 10, 2014

DuplicateMigrationNameError Basically means that there is a class already defined with the same name

db/migrate/sometimestamp_your_migration_name.rb

class YourMigrationName < ActiveRecord::Migration

end

So give the migration file a different name and change the class name as well along with it. something like 

db/migrate/sometimestamp_your_migration_name2.rb

class YourMigrationName2 < ActiveRecord::Migration

end



On Fri, Oct 10, 2014 at 10:02 AM, Richard Lenawasae <lists@ruby-forum.com> wrote:
Hi,

Please help here....When i try to migrate database "{name}" it shows an
error says!

ActiveRecord::DuplicateMigrationNameError:.......

("Multiple migrations have the name #{name}") and i'm sure i was done
with this table #{name}") previously..

surely it cannot migrate.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/41448128b421ca69d5f455e3e241c936%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAFKVRj9DQ178fWJNTrAmqcw0k3yHYFqGSsjW-FwA11BrCdXzBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment