refactor: remove limitRollback property and add rollback table schema

- Removed the limitRollback property from the baseApp configuration in drop.test.test.ts and traefik.test.ts files.
- Introduced a new SQL file to create a rollback table with relevant fields and constraints.
- Updated the journal and snapshot files to reflect the new rollback schema changes.
This commit is contained in:
Mauricio Siu
2025-06-21 21:21:29 -06:00
parent bf1026af7a
commit 98199e65bf
5 changed files with 5846 additions and 2 deletions

View File

@@ -121,7 +121,6 @@ const baseApp: ApplicationNested = {
updateConfigSwarm: null,
username: null,
dockerContextPath: null,
limitRollback: 5,
rollbackActive: false,
};

View File

@@ -6,7 +6,6 @@ import { expect, test } from "vitest";
const baseApp: ApplicationNested = {
rollbackActive: false,
limitRollback: 5,
applicationId: "",
herokuVersion: "",
giteaRepository: "",

View File

@@ -0,0 +1,13 @@
CREATE TABLE "rollback" (
"rollbackId" text PRIMARY KEY NOT NULL,
"deploymentId" text NOT NULL,
"version" serial NOT NULL,
"image" text,
"createdAt" text NOT NULL,
"fullContext" jsonb
);
--> statement-breakpoint
ALTER TABLE "application" ADD COLUMN "rollbackActive" boolean DEFAULT false;--> statement-breakpoint
ALTER TABLE "deployment" ADD COLUMN "rollbackId" text;--> statement-breakpoint
ALTER TABLE "rollback" ADD CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk" FOREIGN KEY ("deploymentId") REFERENCES "public"."deployment"("deploymentId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "deployment" ADD CONSTRAINT "deployment_rollbackId_rollback_rollbackId_fk" FOREIGN KEY ("rollbackId") REFERENCES "public"."rollback"("rollbackId") ON DELETE cascade ON UPDATE no action;

File diff suppressed because it is too large Load Diff

View File

@@ -666,6 +666,13 @@
"when": 1750559214977,
"tag": "0094_numerous_carmella_unuscione",
"breakpoints": true
},
{
"idx": 95,
"version": "7",
"when": 1750562292392,
"tag": "0095_curly_justice",
"breakpoints": true
}
]
}