feat: add rollback functionality with new table and application schema updates

- Created a new "rollback" table to manage rollback operations.
- Added "rollbackActive" and "limitRollback" columns to the "application" table to support rollback features.
- Established foreign key constraints between the "rollback" and "application" tables for data integrity.
This commit is contained in:
Mauricio Siu
2025-06-01 19:45:33 -06:00
parent d171e3da91
commit a7d1fabd81
3 changed files with 5813 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
CREATE TABLE "rollback" (
"rollbackId" text PRIMARY KEY NOT NULL,
"env" text,
"applicationId" text NOT NULL,
"version" serial NOT NULL,
"image" text,
"createdAt" text NOT NULL
);
--> statement-breakpoint
ALTER TABLE "application" ADD COLUMN "rollbackActive" boolean DEFAULT false;--> statement-breakpoint
ALTER TABLE "application" ADD COLUMN "limitRollback" integer DEFAULT 5;--> statement-breakpoint
ALTER TABLE "rollback" ADD CONSTRAINT "rollback_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;

File diff suppressed because it is too large Load Diff

View File

@@ -652,6 +652,13 @@
"when": 1747713229160,
"tag": "0092_stiff_the_watchers",
"breakpoints": true
},
{
"idx": 93,
"version": "7",
"when": 1748828655755,
"tag": "0093_yielding_typhoid_mary",
"breakpoints": true
}
]
}