Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run sqitch revert past warehouse/organism #41

Closed
kairstenfay opened this issue Jul 16, 2019 · 1 comment
Closed

Cannot run sqitch revert past warehouse/organism #41

kairstenfay opened this issue Jul 16, 2019 · 1 comment

Comments

@kairstenfay
Copy link
Contributor

When running sqitch revert on a recent copy of the seattleflu db from production, I get the following error:

Change "warehouse/target/organism @2019-07-12" required by currently deployed change: seattleflu/id3c-customizations:warehouse/target/data

Truncating warehouse.organism produces this error:

seattleflu=# truncate warehouse.organism;
ERROR:  cannot truncate a table referenced in a foreign key constraint
DETAIL:  Table "target" references "organism".
HINT:  Truncate table "target" at the same time, or use TRUNCATE ... CASCADE.

Running sqitch revert warehouse/kit works, though.

@tsibley
Copy link
Member

tsibley commented Aug 5, 2019

This is by design. What the first error message means is that the sqitch project in seattleflu/id3c-customizations has a change (adding our organism data) which relies on the ID3C sqitch change warehouse/target/organism. If you revert the id3c-customizations change first, then you can revert past warehouse/target/organism. In general though, I find that doing large sqitch reverts in dev is usually unnecessary once a change has been deployed to production. Happy to discuss this in more detail in person when you're back (or via video before then).

@tsibley tsibley closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants