feat(rollback): add rollback constraints and snapshots

- Introduced two new SQL files for rollback constraints, updating foreign key relationships with different delete actions (set null and cascade).
- Updated the journal and snapshot files to include the new rollback schema changes for versions 0096 and 0097.
- Enhanced the application service to handle rollback image tagging based on source type.
- Implemented rollback removal logic in the deployment service to ensure proper cleanup of rollback entries.
This commit is contained in:
Mauricio Siu
2025-06-21 23:17:21 -06:00
parent 8c5e34c528
commit 3d285ca437
8 changed files with 11732 additions and 17 deletions

View File

@@ -216,8 +216,12 @@ export const deployApplication = async ({
await updateApplicationStatus(applicationId, "done");
if (application.rollbackActive) {
const tagImage =
application.sourceType === "docker"
? application.dockerImage
: application.appName;
await createRollback({
appName: application.appName,
appName: tagImage || "",
deploymentId: deployment.deploymentId,
});
}