diff --git a/apps/dokploy/drizzle/0111_public_fixer.sql b/apps/dokploy/drizzle/0111_tiny_landau.sql similarity index 77% rename from apps/dokploy/drizzle/0111_public_fixer.sql rename to apps/dokploy/drizzle/0111_tiny_landau.sql index 3ccbd3311..a35f2c40c 100644 --- a/apps/dokploy/drizzle/0111_public_fixer.sql +++ b/apps/dokploy/drizzle/0111_tiny_landau.sql @@ -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"; \ No newline at end of file +ALTER TABLE "mount" DROP COLUMN "serviceType";--> statement-breakpoint +ALTER TABLE "volume_backup" DROP COLUMN "serviceType";--> statement-breakpoint +DROP TYPE "public"."serviceType"; \ No newline at end of file diff --git a/apps/dokploy/drizzle/meta/0111_snapshot.json b/apps/dokploy/drizzle/meta/0111_snapshot.json index e6d4acae5..6d30d61d8 100644 --- a/apps/dokploy/drizzle/meta/0111_snapshot.json +++ b/apps/dokploy/drizzle/meta/0111_snapshot.json @@ -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", diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json index 840423727..ada7fceec 100644 --- a/apps/dokploy/drizzle/meta/_journal.json +++ b/apps/dokploy/drizzle/meta/_journal.json @@ -782,8 +782,8 @@ { "idx": 111, "version": "7", - "when": 1758444932078, - "tag": "0111_public_fixer", + "when": 1758445112312, + "tag": "0111_tiny_landau", "breakpoints": true } ] diff --git a/packages/server/src/db/schema/mount.ts b/packages/server/src/db/schema/mount.ts index 71ebbc993..ef9c3a887 100644 --- a/packages/server/src/db/schema/mount.ts +++ b/packages/server/src/db/schema/mount.ts @@ -12,17 +12,6 @@ import { mysql } from "./mysql"; import { postgres } from "./postgres"; import { redis } from "./redis"; -export const serviceType = pgEnum("serviceType", [ - "application", - "compose", - "libsql", - "mariadb", - "mongo", - "mysql", - "postgres", - "redis", -]); - export const mountType = pgEnum("mountType", ["bind", "volume", "file"]); export const mounts = pgTable("mount", { @@ -35,7 +24,6 @@ export const mounts = pgTable("mount", { volumeName: text("volumeName"), filePath: text("filePath"), content: text("content"), - serviceType: serviceType("serviceType").notNull().default("application"), mountPath: text("mountPath").notNull(), applicationId: text("applicationId").references( () => applications.applicationId, @@ -108,24 +96,8 @@ const createSchema = createInsertSchema(mounts, { mountPath: z.string().min(1), mountId: z.string().optional(), filePath: z.string().optional(), - serviceType: z - .enum([ - "application", - "compose", - "libsql", - "mariadb", - "mongo", - "mysql", - "postgres", - "redis", - ]) - .default("application"), }); -export type ServiceType = NonNullable< - z.infer["serviceType"] ->; - export const apiCreateMount = createSchema .pick({ type: true, @@ -133,7 +105,6 @@ export const apiCreateMount = createSchema volumeName: true, content: true, mountPath: true, - serviceType: true, filePath: true, }) .extend({ @@ -161,7 +132,6 @@ export const apiFindMountByApplicationId = createSchema }) .pick({ serviceId: true, - serviceType: true, }) .required(); diff --git a/packages/server/src/db/schema/volume-backups.ts b/packages/server/src/db/schema/volume-backups.ts index fd3b48253..40b04ccd1 100644 --- a/packages/server/src/db/schema/volume-backups.ts +++ b/packages/server/src/db/schema/volume-backups.ts @@ -10,7 +10,6 @@ import { destinations } from "./destination"; import { libsql } from "./libsql"; import { mariadb } from "./mariadb"; import { mongo } from "./mongo"; -import { serviceType } from "./mount"; import { mysql } from "./mysql"; import { postgres } from "./postgres"; import { redis } from "./redis"; @@ -24,7 +23,6 @@ export const volumeBackups = pgTable("volume_backup", { name: text("name").notNull(), volumeName: text("volumeName").notNull(), prefix: text("prefix").notNull(), - serviceType: serviceType("serviceType").notNull().default("application"), appName: text("appName") .notNull() .$defaultFn(() => generateAppName("volumeBackup")),