diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts index 8503384e2..6cb88385f 100644 --- a/apps/dokploy/server/api/routers/postgres.ts +++ b/apps/dokploy/server/api/routers/postgres.ts @@ -6,7 +6,6 @@ import { deployPostgres, findBackupsByDbId, findEnvironmentById, - findMountsByApplicationId, findPostgresById, findProjectById, getMountPath, @@ -18,7 +17,6 @@ import { startServiceRemote, stopService, stopServiceRemote, - updateMount, updatePostgresById, } from "@dokploy/server"; import { TRPCError } from "@trpc/server"; @@ -370,24 +368,6 @@ export const postgresRouter = createTRPCRouter({ }); } - if (rest.dockerImage) { - const mountPath = getMountPath(rest.dockerImage); - const mounts = await findMountsByApplicationId(postgresId, "postgres"); - if (!mounts || mounts.length === 0) { - throw new TRPCError({ - code: "NOT_FOUND", - message: "Mount not found for this Postgres", - }); - } - for (const mount of mounts) { - if (mount.mountPath.startsWith("/var/lib/postgresql")) { - await updateMount(mount.mountId, { - mountPath: mountPath, - }); - } - } - } - const service = await updatePostgresById(postgresId, { ...rest, });