You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
Subsequently calling rake db:migrate is no problem. However, now when we run rake db:setup && rake db:migrate again after deleting our database we get the following error:
duplicate column name: prop2
This because auto_migrate! in rake db:setup already created the column for :prop2.
What to do about this?
The text was updated successfully, but these errors were encountered:
Sorry for digging this up. Have you found a solution for this ? (other than moving away to another ORM). Currently I'm simply not running migrations for new DBs.
Not a good idea to mix auto migration and migration files. One or the other. Also, db:setup appears to do some portion of the migration. Try db:create db:migrate if you don't want auto migration.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Given an initial model
Foo
:We perform a
rake db:setup && rake db:migrate
and all is fine. Now later in development we add a newproperty to our column
:prop2
.We write a migration for this that reads as follows:
Subsequently calling
rake db:migrate
is no problem. However, now when we runrake db:setup && rake db:migrate
again after deleting our database we get the following error:This because auto_migrate! in
rake db:setup
already created the column for:prop2
.What to do about this?
The text was updated successfully, but these errors were encountered: