-
Bug
-
Resolution: Done
-
Blocker
-
None
-
2.14.0 GA
Expected behaviour
When upgrading from 2.13 to 2.14 all migrations should take care of known issues that will cause schema migrations to fail and result in a successful migration.
Current behaviour
When upgrading from 2.13 to 2.14 the changes introduced by THREESCALE-9655 cause a migration to fail.
Migrating to AddPrimaryKeyToFeaturesPlans (REDACTED) == REDACTED AddPrimaryKeyToFeaturesPlans: migrating ===================== [strong_migrations] DANGER: No lock timeout set -- execute("ALTER TABLE features_plans ADD CONSTRAINT features_plans_pk PRIMARY KEY (plan_id, feature_id)") rake aborted! StandardError: An error has occurred, this and all later migrations canceled: PG::UniqueViolation: ERROR: could not create unique index "features_plans_pk" DETAIL: Key (plan_id, feature_id)=(32, 13) is duplicated.
The cause of this is clear in the logs and is in fact due to a bug on the API that allowed duplicate entries of the same record to exist. That bug has in fact been fixed indirectly by the introduction of a primary key on this table but the migration does not take care of the fact the bug existed and would have gotten databases into a broken state in the first place.
- is caused by
-
THREESCALE-9655 Add primary keys to all tables
- Closed
- is documented by
-
THREESCALE-10610 Warning needed to alert customers about upgrade to 2.14 error
- Closed
- links to