Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Production database migration failing #132

Closed
jlauinger opened this issue Feb 7, 2017 · 3 comments
Closed

Production database migration failing #132

jlauinger opened this issue Feb 7, 2017 · 3 comments
Assignees

Comments

@jlauinger
Copy link
Member

A migration in #129 is not deployable on the production system: staff.0017_auto_20170202_2258

Migrating yields a

_mysql_exceptions.IntegrityError: (1452, 'Cannot add or update a child row: 
a foreign key constraint fails (`pyophase`.`#sql-30af_8ea73`, CONSTRAINT 
`staff_ophasecategory_id_3804b945_fk_ophasebase_ophasecategory_id` 
FOREIGN KEY (`ophasecategory_id`) REFERENCES `ophasebase_ophasecategory` (`id`))')

on the first run, and a

_mysql_exceptions.OperationalError: (1054, "Unknown column 
'groupcategory_id' in 'staff_settings_group_categories_enabled'")

in all further runs.

While investigating, I rolled back the database backup from today, Feb 7 03:02 CET. To revert the PR that introduced the incompatibility, revert c4c7a41:

git revert c4c7a411686ef951ee3730ca9b3b714c532534a4
@bhaettasch
Copy link
Member

We should prioritize #77 to detect those issues in the future before merging.

@jlauinger
Copy link
Member Author

To make pyophase deployable again (I needed a separate new feature), I reverted the original PR.

Further deployment and fixing the migration error should be done on the ophaseCategories branch. I opened a new PR #135 to discuss.

@bhaettasch
Copy link
Member

Problem was resolved with merging #135, using the new migrations from 6e838ed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants