0

I recently updated a Rails 4.2 app to 5.1.4. After upgrading, whenever I try to run rake db:migrate, I get a DuplicateMigrationNameError. The first few times, the error pointed to a file so I just changed the name of the migration class and the file name. But after 4 such changes, the rake task threw the error for the file I just changed, with the new file name/class name. If I changed it back, it still threw the same error. If I changed it to something totally new the same thing happened; it picked up the new filename and threw a DuplicateMigrationNameError. I do not have a duplicate file, there are no cached files that I can find. I am running the rails app in a vagrant vm running ubuntu 16.04. The migrations all ran fine on rails 4.2.

4

1 回答 1

0

当迁移的类名重复时,也会发生这种情况。打开迁移并查看类名是否相同。

于 2017-10-12T21:15:42.653 回答