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
Hi, I have noticed that there is a problem with rolling back a data migration.
Scenario:
create a migration
run it
rolled back with the command rake data:migrate:down VERSION=...
run it again with the command rake data:migrate:up VERSION=
Expected result - a migration is applied without errors
Actual result - a migration is applied but it fails with error SQLite3::ConstraintException: UNIQUE constraint failed: data_migrations.version.
As far as I understand Rake-task data:migrate:down should remove a version of the rolled-back migration in the data_migrations table. But it doesn't. That's why when this migration is applied again and data:migrate:up tries to add a new row in the data_migrations table - conflicts with the unique constraint and fails.
The text was updated successfully, but these errors were encountered:
Hi, I have noticed that there is a problem with rolling back a data migration.
Scenario:
rake data:migrate:down VERSION=...
rake data:migrate:up VERSION=
Expected result - a migration is applied without errors
Actual result - a migration is applied but it fails with error
SQLite3::ConstraintException: UNIQUE constraint failed: data_migrations.version
.As far as I understand Rake-task
data:migrate:down
should remove a version of the rolled-back migration in thedata_migrations
table. But it doesn't. That's why when this migration is applied again anddata:migrate:up
tries to add a new row in thedata_migrations
table - conflicts with the unique constraint and fails.The text was updated successfully, but these errors were encountered: