refactor: remove deprecated volume backup SQL files and snapshots

- Deleted SQL files related to the volume_backup table, including type definitions, constraints, and columns that are no longer in use.
- Removed associated snapshot files to maintain consistency and reduce clutter in the database schema.
- This cleanup enhances the overall organization and maintainability of the database structure.
This commit is contained in:
Mauricio Siu
2025-07-05 00:05:36 -06:00
parent 3970cd452b
commit 2918868166
19 changed files with 0 additions and 54800 deletions

View File

@@ -1,30 +0,0 @@
CREATE TYPE "public"."volumeBackupType" AS ENUM('bind', 'volume');--> statement-breakpoint
CREATE TABLE "volume_backup" (
"volumeBackupId" text PRIMARY KEY NOT NULL,
"name" text NOT NULL,
"type" "volumeBackupType" DEFAULT 'volume' NOT NULL,
"volumeName" text,
"hostPath" text,
"prefix" text NOT NULL,
"serviceType" "serviceType" DEFAULT 'application' NOT NULL,
"schedule" text NOT NULL,
"keepLatestCount" integer,
"applicationId" text,
"postgresId" text,
"mariadbId" text,
"mongoId" text,
"mysqlId" text,
"redisId" text,
"composeId" text,
"createdAt" text NOT NULL,
"destinationId" text NOT NULL
);
--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;

View File

@@ -1 +0,0 @@
ALTER TABLE "volume_backup" ADD COLUMN "enabled" boolean;

View File

@@ -1 +0,0 @@
ALTER TABLE "volume_backup" RENAME COLUMN "schedule" TO "cronExpression";

View File

@@ -1 +0,0 @@
ALTER TABLE "backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;

View File

@@ -1,2 +0,0 @@
ALTER TABLE "volume_backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "backup" DROP COLUMN "turnOff";

View File

@@ -1,4 +0,0 @@
ALTER TABLE "volume_backup" ALTER COLUMN "volumeName" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "volume_backup" DROP COLUMN "type";--> statement-breakpoint
ALTER TABLE "volume_backup" DROP COLUMN "hostPath";--> statement-breakpoint
DROP TYPE "public"."volumeBackupType";

View File

@@ -1 +0,0 @@
ALTER TABLE "volume_backup" ADD COLUMN "serviceName" text;

View File

@@ -1,2 +0,0 @@
ALTER TABLE "deployment" ADD COLUMN "volumeBackupId" text;--> statement-breakpoint
ALTER TABLE "deployment" ADD CONSTRAINT "deployment_volumeBackupId_volume_backup_volumeBackupId_fk" FOREIGN KEY ("volumeBackupId") REFERENCES "public"."volume_backup"("volumeBackupId") ON DELETE cascade ON UPDATE no action;

View File

@@ -1 +0,0 @@
ALTER TABLE "volume_backup" ADD COLUMN "appName" text NOT NULL;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -694,69 +694,6 @@
"when": 1751233265357,
"tag": "0098_conscious_chat",
"breakpoints": true
},
{
"idx": 99,
"version": "7",
"when": 1751256324670,
"tag": "0099_eminent_phalanx",
"breakpoints": true
},
{
"idx": 100,
"version": "7",
"when": 1751256405233,
"tag": "0100_living_proudstar",
"breakpoints": true
},
{
"idx": 101,
"version": "7",
"when": 1751256432021,
"tag": "0101_kind_black_tom",
"breakpoints": true
},
{
"idx": 102,
"version": "7",
"when": 1751256715662,
"tag": "0102_lush_ink",
"breakpoints": true
},
{
"idx": 103,
"version": "7",
"when": 1751256796247,
"tag": "0103_mean_jimmy_woo",
"breakpoints": true
},
{
"idx": 104,
"version": "7",
"when": 1751259486912,
"tag": "0104_robust_nighthawk",
"breakpoints": true
},
{
"idx": 105,
"version": "7",
"when": 1751259917258,
"tag": "0105_unknown_firelord",
"breakpoints": true
},
{
"idx": 106,
"version": "7",
"when": 1751260111986,
"tag": "0106_furry_gargoyle",
"breakpoints": true
},
{
"idx": 107,
"version": "7",
"when": 1751260608863,
"tag": "0107_brief_the_fallen",
"breakpoints": true
}
]
}