Add libsql schema with new table and constraints; remove serviceType references

This commit is contained in:
Mauricio Siu
2025-09-21 02:58:53 -06:00
parent 2dffdffaf3
commit 02f0b0b1a4
5 changed files with 6 additions and 71 deletions
@@ -44,9 +44,6 @@ ALTER TABLE "libsql" ADD CONSTRAINT "libsql_environmentId_environment_environmen
ALTER TABLE "libsql" ADD CONSTRAINT "libsql_serverId_server_serverId_fk" FOREIGN KEY ("serverId") REFERENCES "public"."server"("serverId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "mount" ADD CONSTRAINT "mount_libsqlId_libsql_libsqlId_fk" FOREIGN KEY ("libsqlId") REFERENCES "public"."libsql"("libsqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_libsqlId_libsql_libsqlId_fk" FOREIGN KEY ("libsqlId") REFERENCES "public"."libsql"("libsqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "public"."mount" ALTER COLUMN "serviceType" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "public"."volume_backup" ALTER COLUMN "serviceType" SET DATA TYPE text;--> statement-breakpoint
DROP TYPE "public"."serviceType";--> statement-breakpoint
CREATE TYPE "public"."serviceType" AS ENUM('application', 'compose', 'libsql', 'mariadb', 'mongo', 'mysql', 'postgres', 'redis');--> statement-breakpoint
ALTER TABLE "public"."mount" ALTER COLUMN "serviceType" SET DATA TYPE "public"."serviceType" USING "serviceType"::"public"."serviceType";--> statement-breakpoint
ALTER TABLE "public"."volume_backup" ALTER COLUMN "serviceType" SET DATA TYPE "public"."serviceType" USING "serviceType"::"public"."serviceType";
ALTER TABLE "mount" DROP COLUMN "serviceType";--> statement-breakpoint
ALTER TABLE "volume_backup" DROP COLUMN "serviceType";--> statement-breakpoint
DROP TYPE "public"."serviceType";
+1 -31
View File
@@ -1,5 +1,5 @@
{
"id": "8537f903-ea37-4026-954c-b00299c81e55",
"id": "2fbaedf4-c48c-44ba-9abd-0f9774e53bfe",
"prevId": "9f9b4142-e739-4c21-8618-676d62e9b5ae",
"version": "7",
"dialect": "postgresql",
@@ -3875,14 +3875,6 @@
"primaryKey": false,
"notNull": false
},
"serviceType": {
"name": "serviceType",
"type": "serviceType",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'application'"
},
"mountPath": {
"name": "mountPath",
"type": "text",
@@ -6418,14 +6410,6 @@
"primaryKey": false,
"notNull": true
},
"serviceType": {
"name": "serviceType",
"type": "serviceType",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'application'"
},
"appName": {
"name": "appName",
"type": "text",
@@ -6753,20 +6737,6 @@
"file"
]
},
"public.serviceType": {
"name": "serviceType",
"schema": "public",
"values": [
"application",
"compose",
"libsql",
"mariadb",
"mongo",
"mysql",
"postgres",
"redis"
]
},
"public.notificationType": {
"name": "notificationType",
"schema": "public",
+2 -2
View File
@@ -782,8 +782,8 @@
{
"idx": 111,
"version": "7",
"when": 1758444932078,
"tag": "0111_public_fixer",
"when": 1758445112312,
"tag": "0111_tiny_landau",
"breakpoints": true
}
]