I have a github action that:
-
makes the release of the updated code
-
makes a migration on a postgres AWS db
-makes the same migration on another postgres db located to another AWS region
As the updated code will not work without the success of both migrations, if the updated code has been successfully deployed but one of the two migrations fails, how can I rollback even the updated code?
What I am trying to say is
I have a version A of my code that currently runs in production
I want to add some table to my AWS sql servers
I have a Version B which will make some queries on the new tables
the github action starts the update of my code to version B and everything goes well but my migration script has a sql sintax error that makes both migration fail; as the new version code has been successfully deployed, in production I have version B that will rely on not existing tables so I would like to go back to version A
user25450194 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.