diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index cb3684a5a..795d7a862 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -4,6 +4,14 @@ import { AlertBlock } from "@/components/shared/alert-block";
import { Logo } from "@/components/shared/logo";
import { Button, buttonVariants } from "@/components/ui/button";
import { CardContent, CardDescription } from "@/components/ui/card";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
import {
Form,
FormControl,
@@ -20,14 +28,6 @@ import {
InputOTPSlot,
} from "@/components/ui/input-otp";
import { Label } from "@/components/ui/label";
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogHeader,
- DialogTitle,
- DialogTrigger,
-} from "@/components/ui/dialog";
import { authClient } from "@/lib/auth-client";
import { cn } from "@/lib/utils";
import { api } from "@/utils/api";
diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx
index 60cdfa854..c11cc8225 100644
--- a/apps/dokploy/pages/invitation.tsx
+++ b/apps/dokploy/pages/invitation.tsx
@@ -85,7 +85,7 @@ const Invitation = ({
userAlreadyExists,
}: Props) => {
const router = useRouter();
- const { data } = api.admin.getUserByToken.useQuery(
+ const { data } = api.user.getUserByToken.useQuery(
{
token,
},
diff --git a/apps/dokploy/server/api/routers/admin.ts b/apps/dokploy/server/api/routers/admin.ts
index b15ed616e..293b7dfe5 100644
--- a/apps/dokploy/server/api/routers/admin.ts
+++ b/apps/dokploy/server/api/routers/admin.ts
@@ -1,4 +1,3 @@
-import { db } from "@/server/db";
import {
apiAssignPermissions,
apiCreateUserInvitation,
@@ -14,11 +13,9 @@ import {
getUserByToken,
removeUserById,
setupWebMonitoring,
- updateAdminById,
updateUser,
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
-import { eq } from "drizzle-orm";
import { z } from "zod";
import {
adminProcedure,
@@ -131,7 +128,7 @@ export const adminRouter = createTRPCRouter({
if (user.id !== ctx.user.ownerId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to setup this server",
+ message: "You are not authorized to setup the monitoring",
});
}
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index a74c2bfbb..d9cd46d24 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -39,7 +39,6 @@ import {
createComposeByTemplate,
createDomain,
createMount,
- findAdminById,
findComposeById,
findDomainsByComposeId,
findProjectById,
diff --git a/apps/dokploy/server/api/routers/organization.ts b/apps/dokploy/server/api/routers/organization.ts
index 30c2630d6..ad77b85cc 100644
--- a/apps/dokploy/server/api/routers/organization.ts
+++ b/apps/dokploy/server/api/routers/organization.ts
@@ -1,11 +1,6 @@
import { db } from "@/server/db";
-import {
- invitation,
- member,
- organization,
- users_temp,
-} from "@/server/db/schema";
-import { IS_CLOUD, auth } from "@dokploy/server/index";
+import { invitation, member, organization } from "@/server/db/schema";
+import { IS_CLOUD } from "@dokploy/server/index";
import { TRPCError } from "@trpc/server";
import { and, desc, eq, exists } from "drizzle-orm";
import { nanoid } from "nanoid";
@@ -45,7 +40,7 @@ export const organizationRouter = createTRPCRouter({
});
}
- const memberResult = await db.insert(member).values({
+ await db.insert(member).values({
organizationId: result.id,
role: "owner",
createdAt: new Date(),
@@ -142,7 +137,7 @@ export const organizationRouter = createTRPCRouter({
allInvitations: adminProcedure.query(async ({ ctx }) => {
return await db.query.invitation.findMany({
where: eq(invitation.organizationId, ctx.session.activeOrganizationId),
- orderBy: [desc(invitation.status)],
+ orderBy: [desc(invitation.status), desc(invitation.expiresAt)],
});
}),
acceptInvitation: adminProcedure
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index 2bfc06f78..c0717a924 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -1,18 +1,31 @@
import { apiFindOneUser, apiFindOneUserByAuth } from "@/server/db/schema";
import {
IS_CLOUD,
+ findOrganizationById,
findUserByAuthId,
findUserById,
+ getUserByToken,
removeUserById,
updateUser,
verify2FA,
} from "@dokploy/server";
import { db } from "@dokploy/server/db";
-import { account, apiUpdateUser, member } from "@dokploy/server/db/schema";
+import {
+ account,
+ apiAssignPermissions,
+ apiFindOneToken,
+ apiUpdateUser,
+ member,
+} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { eq } from "drizzle-orm";
+import { and, eq } from "drizzle-orm";
import { z } from "zod";
-import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
+import {
+ adminProcedure,
+ createTRPCRouter,
+ protectedProcedure,
+ publicProcedure,
+} from "../trpc";
export const userRouter = createTRPCRouter({
all: adminProcedure.query(async ({ ctx }) => {
return await db.query.member.findMany({
@@ -39,14 +52,36 @@ export const userRouter = createTRPCRouter({
return user;
}),
get: protectedProcedure.query(async ({ ctx }) => {
- return await findUserById(ctx.user.id);
+ const memberResult = await db.query.member.findFirst({
+ where: and(
+ eq(member.userId, ctx.user.id),
+ eq(member.organizationId, ctx.session?.activeOrganizationId || ""),
+ ),
+ with: {
+ user: true,
+ },
+ });
+
+ return memberResult;
}),
update: protectedProcedure
.input(apiUpdateUser)
.mutation(async ({ input, ctx }) => {
return await updateUser(ctx.user.id, input);
}),
-
+ getUserByToken: publicProcedure
+ .input(apiFindOneToken)
+ .query(async ({ input }) => {
+ return await getUserByToken(input.token);
+ }),
+ getMetricsToken: protectedProcedure.query(async ({ ctx }) => {
+ const user = await findUserById(ctx.user.ownerId);
+ return {
+ serverIp: user.serverIp,
+ enabledFeatures: user.enablePaidFeatures,
+ metricsConfig: user?.metricsConfig,
+ };
+ }),
remove: protectedProcedure
.input(
z.object({
@@ -59,4 +94,28 @@ export const userRouter = createTRPCRouter({
}
return await removeUserById(input.userId);
}),
+ assignPermissions: adminProcedure
+ .input(apiAssignPermissions)
+ .mutation(async ({ input, ctx }) => {
+ try {
+ const user = await findUserById(input.id);
+
+ const organization = await findOrganizationById(
+ ctx.session?.activeOrganizationId || "",
+ );
+
+ if (organization?.ownerId !== ctx.user.ownerId) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You are not allowed to assign permissions",
+ });
+ }
+
+ await updateUser(user.id, {
+ ...input,
+ });
+ } catch (error) {
+ throw error;
+ }
+ }),
});
From 725bd1a38186f41248d1f68aacd7c7e70b304553 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 21 Feb 2025 00:00:22 -0600
Subject: [PATCH 48/89] refactor: migrate permissions from user_temp to member
table
---
apps/dokploy/drizzle/0066_yielding_echo.sql | 24 +--
apps/dokploy/drizzle/0067_migrate-data.sql | 74 ++++++---
apps/dokploy/drizzle/meta/0066_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0067_snapshot.json | 166 +++++++++----------
apps/dokploy/drizzle/meta/0068_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0069_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0070_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0071_snapshot.json | 166 +++++++++----------
apps/dokploy/drizzle/meta/0072_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0073_snapshot.json | 154 ++++++++---------
apps/dokploy/drizzle/meta/0074_snapshot.json | 158 +++++++++---------
apps/dokploy/drizzle/meta/0075_snapshot.json | 158 +++++++++---------
lefthook.yml | 4 +-
packages/server/auth-schema.ts | 10 +-
packages/server/src/db/schema/account.ts | 25 ++-
packages/server/src/db/schema/user.ts | 63 +++----
packages/server/src/lib/auth.ts | 1 +
17 files changed, 897 insertions(+), 876 deletions(-)
diff --git a/apps/dokploy/drizzle/0066_yielding_echo.sql b/apps/dokploy/drizzle/0066_yielding_echo.sql
index d69a4c659..274f4acb6 100644
--- a/apps/dokploy/drizzle/0066_yielding_echo.sql
+++ b/apps/dokploy/drizzle/0066_yielding_echo.sql
@@ -5,17 +5,6 @@ CREATE TABLE "user_temp" (
"isRegistered" boolean DEFAULT false NOT NULL,
"expirationDate" text NOT NULL,
"createdAt" text NOT NULL,
- "canCreateProjects" boolean DEFAULT false NOT NULL,
- "canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
- "canCreateServices" boolean DEFAULT false NOT NULL,
- "canDeleteProjects" boolean DEFAULT false NOT NULL,
- "canDeleteServices" boolean DEFAULT false NOT NULL,
- "canAccessToDocker" boolean DEFAULT false NOT NULL,
- "canAccessToAPI" boolean DEFAULT false NOT NULL,
- "canAccessToGitProviders" boolean DEFAULT false NOT NULL,
- "canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
- "accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
- "accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL,
"two_factor_enabled" boolean DEFAULT false NOT NULL,
"email" text NOT NULL,
"email_verified" boolean NOT NULL,
@@ -92,7 +81,18 @@ CREATE TABLE "member" (
"organization_id" text NOT NULL,
"user_id" text NOT NULL,
"role" text NOT NULL,
- "created_at" timestamp NOT NULL
+ "created_at" timestamp NOT NULL,
+ "canCreateProjects" boolean DEFAULT false NOT NULL,
+ "canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
+ "canCreateServices" boolean DEFAULT false NOT NULL,
+ "canDeleteProjects" boolean DEFAULT false NOT NULL,
+ "canDeleteServices" boolean DEFAULT false NOT NULL,
+ "canAccessToDocker" boolean DEFAULT false NOT NULL,
+ "canAccessToAPI" boolean DEFAULT false NOT NULL,
+ "canAccessToGitProviders" boolean DEFAULT false NOT NULL,
+ "canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
+ "accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
+ "accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL
);
--> statement-breakpoint
CREATE TABLE "organization" (
diff --git a/apps/dokploy/drizzle/0067_migrate-data.sql b/apps/dokploy/drizzle/0067_migrate-data.sql
index 8f26fc13e..9cbc09d28 100644
--- a/apps/dokploy/drizzle/0067_migrate-data.sql
+++ b/apps/dokploy/drizzle/0067_migrate-data.sql
@@ -109,17 +109,6 @@ inserted_members AS (
"updated_at",
image,
"createdAt",
- "canAccessToAPI",
- "canAccessToDocker",
- "canAccessToGitProviders",
- "canAccessToSSHKeys",
- "canAccessToTraefikFiles",
- "canCreateProjects",
- "canCreateServices",
- "canDeleteProjects",
- "canDeleteServices",
- "accesedProjects",
- "accesedServices",
"expirationDate",
"isRegistered"
)
@@ -131,17 +120,6 @@ inserted_members AS (
CURRENT_TIMESTAMP,
auth.image,
NOW(),
- COALESCE(u."canAccessToAPI", false),
- COALESCE(u."canAccessToDocker", false),
- COALESCE(u."canAccessToGitProviders", false),
- COALESCE(u."canAccessToSSHKeys", false),
- COALESCE(u."canAccessToTraefikFiles", false),
- COALESCE(u."canCreateProjects", false),
- COALESCE(u."canCreateServices", false),
- COALESCE(u."canDeleteProjects", false),
- COALESCE(u."canDeleteServices", false),
- COALESCE(u."accesedProjects", '{}'),
- COALESCE(u."accesedServices", '{}'),
NOW() + INTERVAL '1 year',
COALESCE(u."isRegistered", false)
FROM "user" u
@@ -180,14 +158,36 @@ inserted_admin_members AS (
"organization_id",
"user_id",
role,
- "created_at"
+ "created_at",
+ "canAccessToAPI",
+ "canAccessToDocker",
+ "canAccessToGitProviders",
+ "canAccessToSSHKeys",
+ "canAccessToTraefikFiles",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "accesedProjects",
+ "accesedServices"
)
SELECT
gen_random_uuid(),
o.id,
a."adminId",
'owner',
- NOW()
+ NOW(),
+ true, -- Los admins tienen todos los permisos por defecto
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ '{}',
+ '{}'
FROM admin a
JOIN inserted_orgs o ON o."owner_id" = a."adminId"
RETURNING *
@@ -198,14 +198,36 @@ INSERT INTO member (
"organization_id",
"user_id",
role,
- "created_at"
+ "created_at",
+ "canAccessToAPI",
+ "canAccessToDocker",
+ "canAccessToGitProviders",
+ "canAccessToSSHKeys",
+ "canAccessToTraefikFiles",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "accesedProjects",
+ "accesedServices"
)
SELECT
gen_random_uuid(),
o.id,
u."userId",
'member',
- NOW()
+ NOW(),
+ COALESCE(u."canAccessToAPI", false),
+ COALESCE(u."canAccessToDocker", false),
+ COALESCE(u."canAccessToGitProviders", false),
+ COALESCE(u."canAccessToSSHKeys", false),
+ COALESCE(u."canAccessToTraefikFiles", false),
+ COALESCE(u."canCreateProjects", false),
+ COALESCE(u."canCreateServices", false),
+ COALESCE(u."canDeleteProjects", false),
+ COALESCE(u."canDeleteServices", false),
+ COALESCE(u."accesedProjects", '{}'),
+ COALESCE(u."accesedServices", '{}')
FROM "user" u
JOIN admin a ON u."adminId" = a."adminId"
JOIN inserted_orgs o ON o."owner_id" = a."adminId";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0066_snapshot.json b/apps/dokploy/drizzle/meta/0066_snapshot.json
index 06b899346..cebb1e573 100644
--- a/apps/dokploy/drizzle/meta/0066_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0066_snapshot.json
@@ -933,83 +933,6 @@
"primaryKey": false,
"notNull": true
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4937,6 +4860,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0067_snapshot.json b/apps/dokploy/drizzle/meta/0067_snapshot.json
index be43b406b..354b0fc54 100644
--- a/apps/dokploy/drizzle/meta/0067_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0067_snapshot.json
@@ -933,83 +933,6 @@
"primaryKey": false,
"notNull": true
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4937,6 +4860,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
@@ -4944,28 +4944,28 @@
"member_organization_id_organization_id_fk": {
"name": "member_organization_id_organization_id_fk",
"tableFrom": "member",
+ "tableTo": "organization",
"columnsFrom": [
"organization_id"
],
- "tableTo": "organization",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"member_user_id_user_temp_id_fk": {
"name": "member_user_id_user_temp_id_fk",
"tableFrom": "member",
+ "tableTo": "user_temp",
"columnsFrom": [
"user_id"
],
- "tableTo": "user_temp",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
diff --git a/apps/dokploy/drizzle/meta/0068_snapshot.json b/apps/dokploy/drizzle/meta/0068_snapshot.json
index 2139b1321..2389356e5 100644
--- a/apps/dokploy/drizzle/meta/0068_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0068_snapshot.json
@@ -933,83 +933,6 @@
"primaryKey": false,
"notNull": true
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4937,6 +4860,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0069_snapshot.json b/apps/dokploy/drizzle/meta/0069_snapshot.json
index d3e5be98b..12093eab8 100644
--- a/apps/dokploy/drizzle/meta/0069_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0069_snapshot.json
@@ -941,83 +941,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4945,6 +4868,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0070_snapshot.json b/apps/dokploy/drizzle/meta/0070_snapshot.json
index e3864a19c..bc5f2b131 100644
--- a/apps/dokploy/drizzle/meta/0070_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0070_snapshot.json
@@ -941,83 +941,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -5097,6 +5020,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0071_snapshot.json b/apps/dokploy/drizzle/meta/0071_snapshot.json
index cce94ce93..cd24cb0c6 100644
--- a/apps/dokploy/drizzle/meta/0071_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0071_snapshot.json
@@ -941,83 +941,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -5097,6 +5020,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
@@ -5104,28 +5104,28 @@
"member_organization_id_organization_id_fk": {
"name": "member_organization_id_organization_id_fk",
"tableFrom": "member",
+ "tableTo": "organization",
"columnsFrom": [
"organization_id"
],
- "tableTo": "organization",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"member_user_id_user_temp_id_fk": {
"name": "member_user_id_user_temp_id_fk",
"tableFrom": "member",
+ "tableTo": "user_temp",
"columnsFrom": [
"user_id"
],
- "tableTo": "user_temp",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
diff --git a/apps/dokploy/drizzle/meta/0072_snapshot.json b/apps/dokploy/drizzle/meta/0072_snapshot.json
index 53797c0b9..f049dd977 100644
--- a/apps/dokploy/drizzle/meta/0072_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0072_snapshot.json
@@ -941,83 +941,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4945,6 +4868,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0073_snapshot.json b/apps/dokploy/drizzle/meta/0073_snapshot.json
index 6b65df2f7..5ccdef32f 100644
--- a/apps/dokploy/drizzle/meta/0073_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0073_snapshot.json
@@ -781,83 +781,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4494,6 +4417,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
diff --git a/apps/dokploy/drizzle/meta/0074_snapshot.json b/apps/dokploy/drizzle/meta/0074_snapshot.json
index 7c3df01b3..61353329d 100644
--- a/apps/dokploy/drizzle/meta/0074_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0074_snapshot.json
@@ -781,83 +781,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4494,6 +4417,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
@@ -4508,7 +4508,7 @@
"columnsTo": [
"id"
],
- "onDelete": "cascade",
+ "onDelete": "no action",
"onUpdate": "no action"
},
"member_user_id_user_temp_id_fk": {
@@ -4521,7 +4521,7 @@
"columnsTo": [
"id"
],
- "onDelete": "cascade",
+ "onDelete": "no action",
"onUpdate": "no action"
}
},
diff --git a/apps/dokploy/drizzle/meta/0075_snapshot.json b/apps/dokploy/drizzle/meta/0075_snapshot.json
index fb28e29c9..71a7e3eae 100644
--- a/apps/dokploy/drizzle/meta/0075_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0075_snapshot.json
@@ -781,83 +781,6 @@
"notNull": false,
"default": "now()"
},
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -4494,6 +4417,83 @@
"type": "timestamp",
"primaryKey": false,
"notNull": true
+ },
+ "canCreateProjects": {
+ "name": "canCreateProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToSSHKeys": {
+ "name": "canAccessToSSHKeys",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canCreateServices": {
+ "name": "canCreateServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteProjects": {
+ "name": "canDeleteProjects",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canDeleteServices": {
+ "name": "canDeleteServices",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToDocker": {
+ "name": "canAccessToDocker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToAPI": {
+ "name": "canAccessToAPI",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToGitProviders": {
+ "name": "canAccessToGitProviders",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "canAccessToTraefikFiles": {
+ "name": "canAccessToTraefikFiles",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "accesedProjects": {
+ "name": "accesedProjects",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
+ },
+ "accesedServices": {
+ "name": "accesedServices",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "ARRAY[]::text[]"
}
},
"indexes": {},
@@ -4508,7 +4508,7 @@
"columnsTo": [
"id"
],
- "onDelete": "cascade",
+ "onDelete": "no action",
"onUpdate": "no action"
},
"member_user_id_user_temp_id_fk": {
@@ -4521,7 +4521,7 @@
"columnsTo": [
"id"
],
- "onDelete": "cascade",
+ "onDelete": "no action",
"onUpdate": "no action"
}
},
diff --git a/lefthook.yml b/lefthook.yml
index 1a491cd8a..3f5a6d09f 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -37,9 +37,9 @@
commit-msg:
commands:
commitlint:
- run: "npx commitlint --edit $1"
+ # run: "npx commitlint --edit $1"
pre-commit:
commands:
check:
- run: "pnpm check"
+ # run: "pnpm check"
diff --git a/packages/server/auth-schema.ts b/packages/server/auth-schema.ts
index 2500b615f..de0f4bbb4 100644
--- a/packages/server/auth-schema.ts
+++ b/packages/server/auth-schema.ts
@@ -1,9 +1,9 @@
import {
- boolean,
- integer,
pgTable,
text,
+ integer,
timestamp,
+ boolean,
} from "drizzle-orm/pg-core";
export const users_temp = pgTable("users_temp", {
@@ -15,8 +15,8 @@ export const users_temp = pgTable("users_temp", {
createdAt: timestamp("created_at").notNull(),
updatedAt: timestamp("updated_at").notNull(),
twoFactorEnabled: boolean("two_factor_enabled"),
- role: text("role").notNull(),
- ownerId: text("owner_id").notNull(),
+ role: text("role"),
+ ownerId: text("owner_id"),
});
export const session = pgTable("session", {
@@ -66,7 +66,7 @@ export const twoFactor = pgTable("two_factor", {
backupCodes: text("backup_codes").notNull(),
userId: text("user_id")
.notNull()
- .references(() => users_temp.id, { onDelete: "cascade" }),
+ .references(() => user.id, { onDelete: "cascade" }),
});
export const organization = pgTable("organization", {
diff --git a/packages/server/src/db/schema/account.ts b/packages/server/src/db/schema/account.ts
index 969919030..9d55016d9 100644
--- a/packages/server/src/db/schema/account.ts
+++ b/packages/server/src/db/schema/account.ts
@@ -1,4 +1,4 @@
-import { relations } from "drizzle-orm";
+import { relations, sql } from "drizzle-orm";
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
import { nanoid } from "nanoid";
import { projects } from "./project";
@@ -87,6 +87,29 @@ export const member = pgTable("member", {
.references(() => users_temp.id, { onDelete: "cascade" }),
role: text("role").notNull().$type<"owner" | "member" | "admin">(),
createdAt: timestamp("created_at").notNull(),
+
+ // Permissions
+ canCreateProjects: boolean("canCreateProjects").notNull().default(false),
+ canAccessToSSHKeys: boolean("canAccessToSSHKeys").notNull().default(false),
+ canCreateServices: boolean("canCreateServices").notNull().default(false),
+ canDeleteProjects: boolean("canDeleteProjects").notNull().default(false),
+ canDeleteServices: boolean("canDeleteServices").notNull().default(false),
+ canAccessToDocker: boolean("canAccessToDocker").notNull().default(false),
+ canAccessToAPI: boolean("canAccessToAPI").notNull().default(false),
+ canAccessToGitProviders: boolean("canAccessToGitProviders")
+ .notNull()
+ .default(false),
+ canAccessToTraefikFiles: boolean("canAccessToTraefikFiles")
+ .notNull()
+ .default(false),
+ accessedProjects: text("accesedProjects")
+ .array()
+ .notNull()
+ .default(sql`ARRAY[]::text[]`),
+ accessedServices: text("accesedServices")
+ .array()
+ .notNull()
+ .default(sql`ARRAY[]::text[]`),
});
export const memberRelations = relations(member, ({ one }) => ({
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index a8f4cbcf0..d1ebf9df8 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -38,31 +38,6 @@ export const users_temp = pgTable("user_temp", {
.notNull()
.$defaultFn(() => new Date().toISOString()),
createdAt: timestamp("created_at").defaultNow(),
- canCreateProjects: boolean("canCreateProjects").notNull().default(false),
- canAccessToSSHKeys: boolean("canAccessToSSHKeys").notNull().default(false),
- canCreateServices: boolean("canCreateServices").notNull().default(false),
- canDeleteProjects: boolean("canDeleteProjects").notNull().default(false),
- canDeleteServices: boolean("canDeleteServices").notNull().default(false),
- canAccessToDocker: boolean("canAccessToDocker").notNull().default(false),
- canAccessToAPI: boolean("canAccessToAPI").notNull().default(false),
- canAccessToGitProviders: boolean("canAccessToGitProviders")
- .notNull()
- .default(false),
- canAccessToTraefikFiles: boolean("canAccessToTraefikFiles")
- .notNull()
- .default(false),
- accessedProjects: text("accesedProjects")
- .array()
- .notNull()
- .default(sql`ARRAY[]::text[]`),
- accessedServices: text("accesedServices")
- .array()
- .notNull()
- .default(sql`ARRAY[]::text[]`),
-
- // authId: text("authId")
- // .notNull()
- // .references(() => auth.id, { onDelete: "cascade" }),
// Auth
twoFactorEnabled: boolean("two_factor_enabled"),
email: text("email").notNull().unique(),
@@ -155,14 +130,14 @@ const createSchema = createInsertSchema(users_temp, {
id: z.string().min(1),
token: z.string().min(1),
isRegistered: z.boolean().optional(),
- accessedProjects: z.array(z.string()).optional(),
- accessedServices: z.array(z.string()).optional(),
- canCreateProjects: z.boolean().optional(),
- canCreateServices: z.boolean().optional(),
- canDeleteProjects: z.boolean().optional(),
- canDeleteServices: z.boolean().optional(),
- canAccessToDocker: z.boolean().optional(),
- canAccessToTraefikFiles: z.boolean().optional(),
+ // accessedProjects: z.array(z.string()).optional(),
+ // accessedServices: z.array(z.string()).optional(),
+ // canCreateProjects: z.boolean().optional(),
+ // canCreateServices: z.boolean().optional(),
+ // canDeleteProjects: z.boolean().optional(),
+ // canDeleteServices: z.boolean().optional(),
+ // canAccessToDocker: z.boolean().optional(),
+ // canAccessToTraefikFiles: z.boolean().optional(),
});
export const apiCreateUserInvitation = createSchema.pick({}).extend({
@@ -184,17 +159,17 @@ export const apiFindOneToken = createSchema
export const apiAssignPermissions = createSchema
.pick({
id: true,
- canCreateProjects: true,
- canCreateServices: true,
- canDeleteProjects: true,
- canDeleteServices: true,
- accessedProjects: true,
- accessedServices: true,
- canAccessToTraefikFiles: true,
- canAccessToDocker: true,
- canAccessToAPI: true,
- canAccessToSSHKeys: true,
- canAccessToGitProviders: true,
+ // canCreateProjects: true,
+ // canCreateServices: true,
+ // canDeleteProjects: true,
+ // canDeleteServices: true,
+ // accessedProjects: true,
+ // accessedServices: true,
+ // canAccessToTraefikFiles: true,
+ // canAccessToDocker: true,
+ // canAccessToAPI: true,
+ // canAccessToSSHKeys: true,
+ // canAccessToGitProviders: true,
})
.required();
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index a8d75637b..368b43c99 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -10,6 +10,7 @@ import {
import { and, desc, eq } from "drizzle-orm";
import { db } from "../db";
import * as schema from "../db/schema";
+import { ac } from "./permissions";
export const auth = betterAuth({
database: drizzleAdapter(db, {
From 63638bde3378e07a75bb80004dd2523578d1bd9b Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 21 Feb 2025 00:07:36 -0600
Subject: [PATCH 49/89] refactor: consolidate database migration and clean up
legacy user tables
---
apps/dokploy/drizzle/0066_yielding_echo.sql | 510 ++
apps/dokploy/drizzle/0067_migrate-data.sql | 233 -
.../drizzle/0068_sour_professor_monster.sql | 32 -
apps/dokploy/drizzle/0069_broad_ken_ellis.sql | 2 -
.../drizzle/0070_nervous_vivisector.sql | 16 -
.../drizzle/0071_migrate-data-projects.sql | 142 -
apps/dokploy/drizzle/0072_lazy_pixie.sql | 32 -
.../drizzle/0073_polite_miss_america.sql | 6 -
.../dokploy/drizzle/0074_lowly_jack_power.sql | 18 -
.../drizzle/0075_heavy_metal_master.sql | 3 -
apps/dokploy/drizzle/meta/0066_snapshot.json | 595 +-
apps/dokploy/drizzle/meta/0067_snapshot.json | 5329 ----------------
apps/dokploy/drizzle/meta/0068_snapshot.json | 5329 ----------------
apps/dokploy/drizzle/meta/0069_snapshot.json | 5337 ----------------
apps/dokploy/drizzle/meta/0070_snapshot.json | 5489 -----------------
apps/dokploy/drizzle/meta/0071_snapshot.json | 5489 -----------------
apps/dokploy/drizzle/meta/0072_snapshot.json | 5337 ----------------
apps/dokploy/drizzle/meta/0073_snapshot.json | 4878 ---------------
apps/dokploy/drizzle/meta/0074_snapshot.json | 4878 ---------------
apps/dokploy/drizzle/meta/0075_snapshot.json | 4878 ---------------
apps/dokploy/drizzle/meta/_journal.json | 63 -
21 files changed, 582 insertions(+), 48014 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0067_migrate-data.sql
delete mode 100644 apps/dokploy/drizzle/0068_sour_professor_monster.sql
delete mode 100644 apps/dokploy/drizzle/0069_broad_ken_ellis.sql
delete mode 100644 apps/dokploy/drizzle/0070_nervous_vivisector.sql
delete mode 100644 apps/dokploy/drizzle/0071_migrate-data-projects.sql
delete mode 100644 apps/dokploy/drizzle/0072_lazy_pixie.sql
delete mode 100644 apps/dokploy/drizzle/0073_polite_miss_america.sql
delete mode 100644 apps/dokploy/drizzle/0074_lowly_jack_power.sql
delete mode 100644 apps/dokploy/drizzle/0075_heavy_metal_master.sql
delete mode 100644 apps/dokploy/drizzle/meta/0067_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0068_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0069_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0070_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0071_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0072_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0073_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0074_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0075_snapshot.json
diff --git a/apps/dokploy/drizzle/0066_yielding_echo.sql b/apps/dokploy/drizzle/0066_yielding_echo.sql
index 274f4acb6..f4877cf66 100644
--- a/apps/dokploy/drizzle/0066_yielding_echo.sql
+++ b/apps/dokploy/drizzle/0066_yielding_echo.sql
@@ -134,3 +134,513 @@ ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk"
ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;
ALTER TABLE "two_factor" ADD CONSTRAINT "two_factor_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+
+
+
+
+
+-- Data Migration
+
+-- Custom SQL migration file, put your code below! --
+
+WITH inserted_users AS (
+ -- Insertar usuarios desde admins
+ INSERT INTO user_temp (
+ id,
+ email,
+ token,
+ "email_verified",
+ "updated_at",
+ "serverIp",
+ image,
+ "certificateType",
+ host,
+ "letsEncryptEmail",
+ "sshPrivateKey",
+ "enableDockerCleanup",
+ "enableLogRotation",
+ "enablePaidFeatures",
+ "metricsConfig",
+ "cleanupCacheApplications",
+ "cleanupCacheOnPreviews",
+ "cleanupCacheOnCompose",
+ "stripeCustomerId",
+ "stripeSubscriptionId",
+ "serversQuantity",
+ "expirationDate",
+ "createdAt",
+ "isRegistered"
+ )
+ SELECT
+ a."adminId",
+ auth.email,
+ COALESCE(auth.token, ''),
+ true,
+ CURRENT_TIMESTAMP,
+ a."serverIp",
+ auth.image,
+ a."certificateType",
+ a.host,
+ a."letsEncryptEmail",
+ a."sshPrivateKey",
+ a."enableDockerCleanup",
+ a."enableLogRotation",
+ a."enablePaidFeatures",
+ a."metricsConfig",
+ a."cleanupCacheApplications",
+ a."cleanupCacheOnPreviews",
+ a."cleanupCacheOnCompose",
+ a."stripeCustomerId",
+ a."stripeSubscriptionId",
+ a."serversQuantity",
+ NOW() + INTERVAL '1 year',
+ NOW(),
+ true
+ FROM admin a
+ JOIN auth ON auth.id = a."authId"
+ RETURNING *
+),
+inserted_accounts AS (
+ -- Insertar cuentas para los admins
+ INSERT INTO account (
+ id,
+ "account_id",
+ "provider_id",
+ "user_id",
+ password,
+ "created_at",
+ "updated_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ gen_random_uuid(),
+ 'credential',
+ a."adminId",
+ auth.password,
+ NOW(),
+ NOW()
+ FROM admin a
+ JOIN auth ON auth.id = a."authId"
+ RETURNING *
+),
+inserted_orgs AS (
+ -- Crear organizaciones para cada admin
+ INSERT INTO organization (
+ id,
+ name,
+ slug,
+ "owner_id",
+ "created_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ 'My Organization',
+ -- Generamos un slug único usando una función de hash
+ encode(sha256((a."adminId" || CURRENT_TIMESTAMP)::bytea), 'hex'),
+ a."adminId",
+ NOW()
+ FROM admin a
+ RETURNING *
+),
+inserted_members AS (
+ -- Insertar usuarios miembros
+ INSERT INTO user_temp (
+ id,
+ email,
+ token,
+ "email_verified",
+ "updated_at",
+ image,
+ "createdAt",
+ "expirationDate",
+ "isRegistered"
+ )
+ SELECT
+ u."userId",
+ auth.email,
+ COALESCE(u.token, ''),
+ true,
+ CURRENT_TIMESTAMP,
+ auth.image,
+ NOW(),
+ NOW() + INTERVAL '1 year',
+ COALESCE(u."isRegistered", false)
+ FROM "user" u
+ JOIN admin a ON u."adminId" = a."adminId"
+ JOIN auth ON auth.id = u."authId"
+ RETURNING *
+),
+inserted_member_accounts AS (
+ -- Insertar cuentas para los usuarios miembros
+ INSERT INTO account (
+ id,
+ "account_id",
+ "provider_id",
+ "user_id",
+ password,
+ "created_at",
+ "updated_at"
+ )
+ SELECT
+ gen_random_uuid(),
+ gen_random_uuid(),
+ 'credential',
+ u."userId",
+ auth.password,
+ NOW(),
+ NOW()
+ FROM "user" u
+ JOIN admin a ON u."adminId" = a."adminId"
+ JOIN auth ON auth.id = u."authId"
+ RETURNING *
+),
+inserted_admin_members AS (
+ -- Insertar miembros en las organizaciones (admins como owners)
+ INSERT INTO member (
+ id,
+ "organization_id",
+ "user_id",
+ role,
+ "created_at",
+ "canAccessToAPI",
+ "canAccessToDocker",
+ "canAccessToGitProviders",
+ "canAccessToSSHKeys",
+ "canAccessToTraefikFiles",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "accesedProjects",
+ "accesedServices"
+ )
+ SELECT
+ gen_random_uuid(),
+ o.id,
+ a."adminId",
+ 'owner',
+ NOW(),
+ true, -- Los admins tienen todos los permisos por defecto
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ '{}',
+ '{}'
+ FROM admin a
+ JOIN inserted_orgs o ON o."owner_id" = a."adminId"
+ RETURNING *
+)
+-- Insertar miembros regulares en las organizaciones
+INSERT INTO member (
+ id,
+ "organization_id",
+ "user_id",
+ role,
+ "created_at",
+ "canAccessToAPI",
+ "canAccessToDocker",
+ "canAccessToGitProviders",
+ "canAccessToSSHKeys",
+ "canAccessToTraefikFiles",
+ "canCreateProjects",
+ "canCreateServices",
+ "canDeleteProjects",
+ "canDeleteServices",
+ "accesedProjects",
+ "accesedServices"
+)
+SELECT
+ gen_random_uuid(),
+ o.id,
+ u."userId",
+ 'member',
+ NOW(),
+ COALESCE(u."canAccessToAPI", false),
+ COALESCE(u."canAccessToDocker", false),
+ COALESCE(u."canAccessToGitProviders", false),
+ COALESCE(u."canAccessToSSHKeys", false),
+ COALESCE(u."canAccessToTraefikFiles", false),
+ COALESCE(u."canCreateProjects", false),
+ COALESCE(u."canCreateServices", false),
+ COALESCE(u."canDeleteProjects", false),
+ COALESCE(u."canDeleteServices", false),
+ COALESCE(u."accesedProjects", '{}'),
+ COALESCE(u."accesedServices", '{}')
+FROM "user" u
+JOIN admin a ON u."adminId" = a."adminId"
+JOIN inserted_orgs o ON o."owner_id" = a."adminId";
+
+-- Migration tables foreign keys
+
+ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "ssh-key" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
+ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
+--> statement-breakpoint
+ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
+
+
+ALTER TABLE "user_temp" ALTER COLUMN "token" SET DEFAULT '';--> statement-breakpoint
+ALTER TABLE "user_temp" ADD COLUMN "created_at" timestamp DEFAULT now();
+
+
+-- Add properties
+
+ALTER TABLE "project" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "destination" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "certificate" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "registry" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "notification" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "ssh-key" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "server" ADD COLUMN "organizationId" text;--> statement-breakpoint
+ALTER TABLE "project" ADD CONSTRAINT "project_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "destination" ADD CONSTRAINT "destination_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "certificate" ADD CONSTRAINT "certificate_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "registry" ADD CONSTRAINT "registry_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "notification" ADD CONSTRAINT "notification_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "server" ADD CONSTRAINT "server_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;
+
+
+-- Update tables to use organizationId
+
+-- Custom SQL migration file
+
+-- Actualizar projects
+UPDATE "project" p
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = p."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE p."organizationId" IS NULL;
+
+-- Actualizar servers
+UPDATE "server" s
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = s."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE s."organizationId" IS NULL;
+
+-- Actualizar ssh-keys
+UPDATE "ssh-key" k
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = k."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE k."organizationId" IS NULL;
+
+-- Actualizar destinations
+UPDATE "destination" d
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = d."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE d."organizationId" IS NULL;
+
+-- Actualizar registry
+UPDATE "registry" r
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = r."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE r."organizationId" IS NULL;
+
+-- Actualizar notifications
+UPDATE "notification" n
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = n."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE n."organizationId" IS NULL;
+
+-- Actualizar certificates
+UPDATE "certificate" c
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = c."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE c."organizationId" IS NULL;
+
+-- Actualizar git_provider
+UPDATE "git_provider" g
+SET "organizationId" = (
+ SELECT m."organization_id"
+ FROM "member" m
+ WHERE m."user_id" = g."userId"
+ AND m."role" = 'owner'
+ LIMIT 1
+)
+WHERE g."organizationId" IS NULL;
+
+-- Verificar que todos los recursos tengan una organización
+DO $$
+BEGIN
+ IF EXISTS (
+ SELECT 1 FROM "project" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "server" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "ssh-key" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "destination" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "registry" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "notification" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "certificate" WHERE "organizationId" IS NULL
+ UNION ALL
+ SELECT 1 FROM "git_provider" WHERE "organizationId" IS NULL
+ ) THEN
+ RAISE EXCEPTION 'Hay recursos sin organización asignada';
+ END IF;
+END $$;
+
+-- Hacer organization_id NOT NULL en todas las tablas
+ALTER TABLE "project" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "server" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "ssh-key" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "destination" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "registry" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "notification" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "certificate" ALTER COLUMN "organizationId" SET NOT NULL;
+ALTER TABLE "git_provider" ALTER COLUMN "organizationId" SET NOT NULL;
+
+-- Crear índices para mejorar el rendimiento de búsquedas por organización
+CREATE INDEX IF NOT EXISTS "idx_project_organization" ON "project" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_server_organization" ON "server" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_sshkey_organization" ON "ssh-key" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_destination_organization" ON "destination" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_registry_organization" ON "registry" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_notification_organization" ON "notification" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_certificate_organization" ON "certificate" ("organizationId");
+CREATE INDEX IF NOT EXISTS "idx_git_provider_organization" ON "git_provider" ("organizationId");
+
+
+
+
+
+-- Botar tablas de migración
+ALTER TABLE "project" DROP CONSTRAINT "project_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "destination" DROP CONSTRAINT "destination_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "certificate" DROP CONSTRAINT "certificate_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "registry" DROP CONSTRAINT "registry_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "notification" DROP CONSTRAINT "notification_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "server" DROP CONSTRAINT "server_userId_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "project" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "destination" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "certificate" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "registry" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "notification" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "ssh-key" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "git_provider" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "server" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "project" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "destination" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "certificate" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "registry" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "notification" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "ssh-key" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "git_provider" DROP COLUMN "userId";--> statement-breakpoint
+ALTER TABLE "server" DROP COLUMN "userId";
+
+-- Drop tables
+--> statement-breakpoint
+DROP TABLE "user" CASCADE;--> statement-breakpoint
+DROP TABLE "admin" CASCADE;--> statement-breakpoint
+DROP TABLE "auth" CASCADE;--> statement-breakpoint
+DROP TABLE "session" CASCADE;--> statement-breakpoint
+DROP TYPE "public"."Roles";
+
+
+-- Drop tables
+ALTER TABLE "account" DROP CONSTRAINT "account_user_id_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "invitation" DROP CONSTRAINT "invitation_organization_id_organization_id_fk";
+--> statement-breakpoint
+ALTER TABLE "invitation" DROP CONSTRAINT "invitation_inviter_id_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "member" DROP CONSTRAINT "member_organization_id_organization_id_fk";
+--> statement-breakpoint
+ALTER TABLE "member" DROP CONSTRAINT "member_user_id_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "organization" DROP CONSTRAINT "organization_owner_id_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
+
+
+-- Update references
+
+ALTER TABLE "session_temp" DROP CONSTRAINT "session_temp_user_id_user_temp_id_fk";
+--> statement-breakpoint
+ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0067_migrate-data.sql b/apps/dokploy/drizzle/0067_migrate-data.sql
deleted file mode 100644
index 9cbc09d28..000000000
--- a/apps/dokploy/drizzle/0067_migrate-data.sql
+++ /dev/null
@@ -1,233 +0,0 @@
--- Custom SQL migration file, put your code below! --
-
-WITH inserted_users AS (
- -- Insertar usuarios desde admins
- INSERT INTO user_temp (
- id,
- email,
- token,
- "email_verified",
- "updated_at",
- "serverIp",
- image,
- "certificateType",
- host,
- "letsEncryptEmail",
- "sshPrivateKey",
- "enableDockerCleanup",
- "enableLogRotation",
- "enablePaidFeatures",
- "metricsConfig",
- "cleanupCacheApplications",
- "cleanupCacheOnPreviews",
- "cleanupCacheOnCompose",
- "stripeCustomerId",
- "stripeSubscriptionId",
- "serversQuantity",
- "expirationDate",
- "createdAt",
- "isRegistered"
- )
- SELECT
- a."adminId",
- auth.email,
- COALESCE(auth.token, ''),
- true,
- CURRENT_TIMESTAMP,
- a."serverIp",
- auth.image,
- a."certificateType",
- a.host,
- a."letsEncryptEmail",
- a."sshPrivateKey",
- a."enableDockerCleanup",
- a."enableLogRotation",
- a."enablePaidFeatures",
- a."metricsConfig",
- a."cleanupCacheApplications",
- a."cleanupCacheOnPreviews",
- a."cleanupCacheOnCompose",
- a."stripeCustomerId",
- a."stripeSubscriptionId",
- a."serversQuantity",
- NOW() + INTERVAL '1 year',
- NOW(),
- true
- FROM admin a
- JOIN auth ON auth.id = a."authId"
- RETURNING *
-),
-inserted_accounts AS (
- -- Insertar cuentas para los admins
- INSERT INTO account (
- id,
- "account_id",
- "provider_id",
- "user_id",
- password,
- "created_at",
- "updated_at"
- )
- SELECT
- gen_random_uuid(),
- gen_random_uuid(),
- 'credential',
- a."adminId",
- auth.password,
- NOW(),
- NOW()
- FROM admin a
- JOIN auth ON auth.id = a."authId"
- RETURNING *
-),
-inserted_orgs AS (
- -- Crear organizaciones para cada admin
- INSERT INTO organization (
- id,
- name,
- slug,
- "owner_id",
- "created_at"
- )
- SELECT
- gen_random_uuid(),
- 'My Organization',
- -- Generamos un slug único usando una función de hash
- encode(sha256((a."adminId" || CURRENT_TIMESTAMP)::bytea), 'hex'),
- a."adminId",
- NOW()
- FROM admin a
- RETURNING *
-),
-inserted_members AS (
- -- Insertar usuarios miembros
- INSERT INTO user_temp (
- id,
- email,
- token,
- "email_verified",
- "updated_at",
- image,
- "createdAt",
- "expirationDate",
- "isRegistered"
- )
- SELECT
- u."userId",
- auth.email,
- COALESCE(u.token, ''),
- true,
- CURRENT_TIMESTAMP,
- auth.image,
- NOW(),
- NOW() + INTERVAL '1 year',
- COALESCE(u."isRegistered", false)
- FROM "user" u
- JOIN admin a ON u."adminId" = a."adminId"
- JOIN auth ON auth.id = u."authId"
- RETURNING *
-),
-inserted_member_accounts AS (
- -- Insertar cuentas para los usuarios miembros
- INSERT INTO account (
- id,
- "account_id",
- "provider_id",
- "user_id",
- password,
- "created_at",
- "updated_at"
- )
- SELECT
- gen_random_uuid(),
- gen_random_uuid(),
- 'credential',
- u."userId",
- auth.password,
- NOW(),
- NOW()
- FROM "user" u
- JOIN admin a ON u."adminId" = a."adminId"
- JOIN auth ON auth.id = u."authId"
- RETURNING *
-),
-inserted_admin_members AS (
- -- Insertar miembros en las organizaciones (admins como owners)
- INSERT INTO member (
- id,
- "organization_id",
- "user_id",
- role,
- "created_at",
- "canAccessToAPI",
- "canAccessToDocker",
- "canAccessToGitProviders",
- "canAccessToSSHKeys",
- "canAccessToTraefikFiles",
- "canCreateProjects",
- "canCreateServices",
- "canDeleteProjects",
- "canDeleteServices",
- "accesedProjects",
- "accesedServices"
- )
- SELECT
- gen_random_uuid(),
- o.id,
- a."adminId",
- 'owner',
- NOW(),
- true, -- Los admins tienen todos los permisos por defecto
- true,
- true,
- true,
- true,
- true,
- true,
- true,
- true,
- '{}',
- '{}'
- FROM admin a
- JOIN inserted_orgs o ON o."owner_id" = a."adminId"
- RETURNING *
-)
--- Insertar miembros regulares en las organizaciones
-INSERT INTO member (
- id,
- "organization_id",
- "user_id",
- role,
- "created_at",
- "canAccessToAPI",
- "canAccessToDocker",
- "canAccessToGitProviders",
- "canAccessToSSHKeys",
- "canAccessToTraefikFiles",
- "canCreateProjects",
- "canCreateServices",
- "canDeleteProjects",
- "canDeleteServices",
- "accesedProjects",
- "accesedServices"
-)
-SELECT
- gen_random_uuid(),
- o.id,
- u."userId",
- 'member',
- NOW(),
- COALESCE(u."canAccessToAPI", false),
- COALESCE(u."canAccessToDocker", false),
- COALESCE(u."canAccessToGitProviders", false),
- COALESCE(u."canAccessToSSHKeys", false),
- COALESCE(u."canAccessToTraefikFiles", false),
- COALESCE(u."canCreateProjects", false),
- COALESCE(u."canCreateServices", false),
- COALESCE(u."canDeleteProjects", false),
- COALESCE(u."canDeleteServices", false),
- COALESCE(u."accesedProjects", '{}'),
- COALESCE(u."accesedServices", '{}')
-FROM "user" u
-JOIN admin a ON u."adminId" = a."adminId"
-JOIN inserted_orgs o ON o."owner_id" = a."adminId";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0068_sour_professor_monster.sql b/apps/dokploy/drizzle/0068_sour_professor_monster.sql
deleted file mode 100644
index f69152b5d..000000000
--- a/apps/dokploy/drizzle/0068_sour_professor_monster.sql
+++ /dev/null
@@ -1,32 +0,0 @@
-ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "ssh-key" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
-ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
---> statement-breakpoint
-ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0069_broad_ken_ellis.sql b/apps/dokploy/drizzle/0069_broad_ken_ellis.sql
deleted file mode 100644
index 3e2c918bd..000000000
--- a/apps/dokploy/drizzle/0069_broad_ken_ellis.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE "user_temp" ALTER COLUMN "token" SET DEFAULT '';--> statement-breakpoint
-ALTER TABLE "user_temp" ADD COLUMN "created_at" timestamp DEFAULT now();
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0070_nervous_vivisector.sql b/apps/dokploy/drizzle/0070_nervous_vivisector.sql
deleted file mode 100644
index 238a17693..000000000
--- a/apps/dokploy/drizzle/0070_nervous_vivisector.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-ALTER TABLE "project" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "destination" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "certificate" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "registry" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "notification" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "ssh-key" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "git_provider" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "server" ADD COLUMN "organizationId" text;--> statement-breakpoint
-ALTER TABLE "project" ADD CONSTRAINT "project_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "destination" ADD CONSTRAINT "destination_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "certificate" ADD CONSTRAINT "certificate_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "registry" ADD CONSTRAINT "registry_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "notification" ADD CONSTRAINT "notification_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "server" ADD CONSTRAINT "server_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0071_migrate-data-projects.sql b/apps/dokploy/drizzle/0071_migrate-data-projects.sql
deleted file mode 100644
index 27ca0bea0..000000000
--- a/apps/dokploy/drizzle/0071_migrate-data-projects.sql
+++ /dev/null
@@ -1,142 +0,0 @@
--- Custom SQL migration file
-
--- Actualizar projects
-UPDATE "project" p
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = p."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE p."organizationId" IS NULL;
-
--- Actualizar servers
-UPDATE "server" s
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = s."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE s."organizationId" IS NULL;
-
--- Actualizar ssh-keys
-UPDATE "ssh-key" k
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = k."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE k."organizationId" IS NULL;
-
--- Actualizar destinations
-UPDATE "destination" d
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = d."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE d."organizationId" IS NULL;
-
--- Actualizar registry
-UPDATE "registry" r
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = r."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE r."organizationId" IS NULL;
-
--- Actualizar notifications
-UPDATE "notification" n
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = n."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE n."organizationId" IS NULL;
-
--- Actualizar certificates
-UPDATE "certificate" c
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = c."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE c."organizationId" IS NULL;
-
--- Actualizar git_provider
-UPDATE "git_provider" g
-SET "organizationId" = (
- SELECT m."organization_id"
- FROM "member" m
- WHERE m."user_id" = g."userId"
- AND m."role" = 'owner'
- LIMIT 1
-)
-WHERE g."organizationId" IS NULL;
-
--- Verificar que todos los recursos tengan una organización
-DO $$
-BEGIN
- IF EXISTS (
- SELECT 1 FROM "project" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "server" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "ssh-key" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "destination" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "registry" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "notification" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "certificate" WHERE "organizationId" IS NULL
- UNION ALL
- SELECT 1 FROM "git_provider" WHERE "organizationId" IS NULL
- ) THEN
- RAISE EXCEPTION 'Hay recursos sin organización asignada';
- END IF;
-END $$;
-
--- Hacer organization_id NOT NULL en todas las tablas
-ALTER TABLE "project" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "server" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "ssh-key" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "destination" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "registry" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "notification" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "certificate" ALTER COLUMN "organizationId" SET NOT NULL;
-ALTER TABLE "git_provider" ALTER COLUMN "organizationId" SET NOT NULL;
-
--- Crear índices para mejorar el rendimiento de búsquedas por organización
-CREATE INDEX IF NOT EXISTS "idx_project_organization" ON "project" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_server_organization" ON "server" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_sshkey_organization" ON "ssh-key" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_destination_organization" ON "destination" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_registry_organization" ON "registry" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_notification_organization" ON "notification" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_certificate_organization" ON "certificate" ("organizationId");
-CREATE INDEX IF NOT EXISTS "idx_git_provider_organization" ON "git_provider" ("organizationId");
-
-
-
-
-
-
-
-
-
diff --git a/apps/dokploy/drizzle/0072_lazy_pixie.sql b/apps/dokploy/drizzle/0072_lazy_pixie.sql
deleted file mode 100644
index f86f444d4..000000000
--- a/apps/dokploy/drizzle/0072_lazy_pixie.sql
+++ /dev/null
@@ -1,32 +0,0 @@
-ALTER TABLE "project" DROP CONSTRAINT "project_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "destination" DROP CONSTRAINT "destination_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "certificate" DROP CONSTRAINT "certificate_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "registry" DROP CONSTRAINT "registry_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "notification" DROP CONSTRAINT "notification_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "server" DROP CONSTRAINT "server_userId_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "project" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "destination" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "certificate" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "registry" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "notification" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "ssh-key" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "git_provider" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "server" ALTER COLUMN "organizationId" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "project" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "destination" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "certificate" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "registry" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "notification" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "ssh-key" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "git_provider" DROP COLUMN "userId";--> statement-breakpoint
-ALTER TABLE "server" DROP COLUMN "userId";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0073_polite_miss_america.sql b/apps/dokploy/drizzle/0073_polite_miss_america.sql
deleted file mode 100644
index 030f8a883..000000000
--- a/apps/dokploy/drizzle/0073_polite_miss_america.sql
+++ /dev/null
@@ -1,6 +0,0 @@
---> statement-breakpoint
-DROP TABLE "user" CASCADE;--> statement-breakpoint
-DROP TABLE "admin" CASCADE;--> statement-breakpoint
-DROP TABLE "auth" CASCADE;--> statement-breakpoint
-DROP TABLE "session" CASCADE;--> statement-breakpoint
-DROP TYPE "public"."Roles";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0074_lowly_jack_power.sql b/apps/dokploy/drizzle/0074_lowly_jack_power.sql
deleted file mode 100644
index 4f09535f4..000000000
--- a/apps/dokploy/drizzle/0074_lowly_jack_power.sql
+++ /dev/null
@@ -1,18 +0,0 @@
-ALTER TABLE "account" DROP CONSTRAINT "account_user_id_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "invitation" DROP CONSTRAINT "invitation_organization_id_organization_id_fk";
---> statement-breakpoint
-ALTER TABLE "invitation" DROP CONSTRAINT "invitation_inviter_id_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "member" DROP CONSTRAINT "member_organization_id_organization_id_fk";
---> statement-breakpoint
-ALTER TABLE "member" DROP CONSTRAINT "member_user_id_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "organization" DROP CONSTRAINT "organization_owner_id_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0075_heavy_metal_master.sql b/apps/dokploy/drizzle/0075_heavy_metal_master.sql
deleted file mode 100644
index 850f532d0..000000000
--- a/apps/dokploy/drizzle/0075_heavy_metal_master.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE "session_temp" DROP CONSTRAINT "session_temp_user_id_user_temp_id_fk";
---> statement-breakpoint
-ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0066_snapshot.json b/apps/dokploy/drizzle/meta/0066_snapshot.json
index cebb1e573..71a7e3eae 100644
--- a/apps/dokploy/drizzle/meta/0066_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0066_snapshot.json
@@ -1,6 +1,6 @@
{
- "id": "67140673-fcd1-4c33-8dd1-bb7a34bdae23",
- "prevId": "1240ec96-1751-4de3-b64f-cef9cb716786",
+ "id": "c5e17a87-0aa3-4178-be24-cfa7cde0f75d",
+ "prevId": "9cb79f1e-14c2-4deb-b1ab-a1d038f72356",
"version": "7",
"dialect": "postgresql",
"tables": {
@@ -731,166 +731,6 @@
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "tableTo": "admin",
- "columnsFrom": [
- "adminId"
- ],
- "columnsTo": [
- "adminId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
"public.user_temp": {
"name": "user_temp",
"schema": "",
@@ -912,7 +752,8 @@
"name": "token",
"type": "text",
"primaryKey": false,
- "notNull": true
+ "notNull": true,
+ "default": "''"
},
"isRegistered": {
"name": "isRegistered",
@@ -933,6 +774,13 @@
"primaryKey": false,
"notNull": true
},
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "now()"
+ },
"two_factor_enabled": {
"name": "two_factor_enabled",
"type": "boolean",
@@ -1098,252 +946,6 @@
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
"public.project": {
"name": "project",
"schema": "",
@@ -1372,8 +974,8 @@
"primaryKey": false,
"notNull": true
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -1388,15 +990,15 @@
},
"indexes": {},
"foreignKeys": {
- "project_adminId_admin_adminId_fk": {
- "name": "project_adminId_admin_adminId_fk",
+ "project_organizationId_organization_id_fk": {
+ "name": "project_organizationId_organization_id_fk",
"tableFrom": "project",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2249,8 +1851,8 @@
"primaryKey": false,
"notNull": true
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2258,15 +1860,15 @@
},
"indexes": {},
"foreignKeys": {
- "destination_adminId_admin_adminId_fk": {
- "name": "destination_adminId_admin_adminId_fk",
+ "destination_organizationId_organization_id_fk": {
+ "name": "destination_organizationId_organization_id_fk",
"tableFrom": "destination",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2657,8 +2259,8 @@
"primaryKey": false,
"notNull": false
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -2672,15 +2274,15 @@
},
"indexes": {},
"foreignKeys": {
- "certificate_adminId_admin_adminId_fk": {
- "name": "certificate_adminId_admin_adminId_fk",
+ "certificate_organizationId_organization_id_fk": {
+ "name": "certificate_organizationId_organization_id_fk",
"tableFrom": "certificate",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -2790,7 +2392,7 @@
"columnsTo": [
"id"
],
- "onDelete": "no action",
+ "onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -2808,51 +2410,6 @@
"checkConstraints": {},
"isRLSEnabled": false
},
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "tableTo": "auth",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
"public.redirect": {
"name": "redirect",
"schema": "",
@@ -3574,8 +3131,8 @@
"notNull": true,
"default": "'cloud'"
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -3583,15 +3140,15 @@
},
"indexes": {},
"foreignKeys": {
- "registry_adminId_admin_adminId_fk": {
- "name": "registry_adminId_admin_adminId_fk",
+ "registry_organizationId_organization_id_fk": {
+ "name": "registry_organizationId_organization_id_fk",
"tableFrom": "registry",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -3834,8 +3391,8 @@
"primaryKey": false,
"notNull": false
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -3908,15 +3465,15 @@
"onDelete": "cascade",
"onUpdate": "no action"
},
- "notification_adminId_admin_adminId_fk": {
- "name": "notification_adminId_admin_adminId_fk",
+ "notification_organizationId_organization_id_fk": {
+ "name": "notification_organizationId_organization_id_fk",
"tableFrom": "notification",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4037,8 +3594,8 @@
"primaryKey": false,
"notNull": false
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -4046,15 +3603,15 @@
},
"indexes": {},
"foreignKeys": {
- "ssh-key_adminId_admin_adminId_fk": {
- "name": "ssh-key_adminId_admin_adminId_fk",
+ "ssh-key_organizationId_organization_id_fk": {
+ "name": "ssh-key_organizationId_organization_id_fk",
"tableFrom": "ssh-key",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4096,8 +3653,8 @@
"primaryKey": false,
"notNull": true
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -4105,15 +3662,15 @@
},
"indexes": {},
"foreignKeys": {
- "git_provider_adminId_admin_adminId_fk": {
- "name": "git_provider_adminId_admin_adminId_fk",
+ "git_provider_organizationId_organization_id_fk": {
+ "name": "git_provider_organizationId_organization_id_fk",
"tableFrom": "git_provider",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4411,8 +3968,8 @@
"primaryKey": false,
"notNull": true
},
- "adminId": {
- "name": "adminId",
+ "organizationId": {
+ "name": "organizationId",
"type": "text",
"primaryKey": false,
"notNull": true
@@ -4448,15 +4005,15 @@
},
"indexes": {},
"foreignKeys": {
- "server_adminId_admin_adminId_fk": {
- "name": "server_adminId_admin_adminId_fk",
+ "server_organizationId_organization_id_fk": {
+ "name": "server_organizationId_organization_id_fk",
"tableFrom": "server",
- "tableTo": "admin",
+ "tableTo": "organization",
"columnsFrom": [
- "adminId"
+ "organizationId"
],
"columnsTo": [
- "adminId"
+ "id"
],
"onDelete": "cascade",
"onUpdate": "no action"
@@ -4735,7 +4292,7 @@
"columnsTo": [
"id"
],
- "onDelete": "no action",
+ "onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -4804,7 +4361,7 @@
"columnsTo": [
"id"
],
- "onDelete": "no action",
+ "onDelete": "cascade",
"onUpdate": "no action"
},
"invitation_inviter_id_user_temp_id_fk": {
@@ -4817,7 +4374,7 @@
"columnsTo": [
"id"
],
- "onDelete": "no action",
+ "onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -5033,7 +4590,7 @@
"columnsTo": [
"id"
],
- "onDelete": "no action",
+ "onDelete": "cascade",
"onUpdate": "no action"
}
},
@@ -5176,14 +4733,6 @@
"drop"
]
},
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
"public.domainType": {
"name": "domainType",
"schema": "public",
diff --git a/apps/dokploy/drizzle/meta/0067_snapshot.json b/apps/dokploy/drizzle/meta/0067_snapshot.json
deleted file mode 100644
index 354b0fc54..000000000
--- a/apps/dokploy/drizzle/meta/0067_snapshot.json
+++ /dev/null
@@ -1,5329 +0,0 @@
-{
- "id": "54ba08a1-8861-438a-a89d-f01d09a690c2",
- "prevId": "67140673-fcd1-4c33-8dd1-bb7a34bdae23",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "registryId"
- ],
- "tableTo": "registry",
- "columnsTo": [
- "registryId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "githubId"
- ],
- "tableTo": "github",
- "columnsTo": [
- "githubId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "gitlabId"
- ],
- "tableTo": "gitlab",
- "columnsTo": [
- "gitlabId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "bitbucketId"
- ],
- "tableTo": "bitbucket",
- "columnsTo": [
- "bitbucketId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "columnsFrom": [
- "authId"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "columns": [
- "email"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "columnsFrom": [
- "authId"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "columns": [
- "email"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_adminId_admin_adminId_fk": {
- "name": "project_adminId_admin_adminId_fk",
- "tableFrom": "project",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "tableTo": "preview_deployments",
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "destinationId"
- ],
- "tableTo": "destination",
- "columnsTo": [
- "destinationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "postgresId"
- ],
- "tableTo": "postgres",
- "columnsTo": [
- "postgresId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mariadbId"
- ],
- "tableTo": "mariadb",
- "columnsTo": [
- "mariadbId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mysqlId"
- ],
- "tableTo": "mysql",
- "columnsTo": [
- "mysqlId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mongoId"
- ],
- "tableTo": "mongo",
- "columnsTo": [
- "mongoId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_adminId_admin_adminId_fk": {
- "name": "destination_adminId_admin_adminId_fk",
- "tableFrom": "destination",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "tableTo": "preview_deployments",
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "postgresId"
- ],
- "tableTo": "postgres",
- "columnsTo": [
- "postgresId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mariadbId"
- ],
- "tableTo": "mariadb",
- "columnsTo": [
- "mariadbId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mongoId"
- ],
- "tableTo": "mongo",
- "columnsTo": [
- "mongoId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mysqlId"
- ],
- "tableTo": "mysql",
- "columnsTo": [
- "mysqlId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "redisId"
- ],
- "tableTo": "redis",
- "columnsTo": [
- "redisId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_adminId_admin_adminId_fk": {
- "name": "certificate_adminId_admin_adminId_fk",
- "tableFrom": "certificate",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "columns": [
- "certificatePath"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "columns": [
- "token"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "columns": [
- "username",
- "applicationId"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "githubId"
- ],
- "tableTo": "github",
- "columnsTo": [
- "githubId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "gitlabId"
- ],
- "tableTo": "gitlab",
- "columnsTo": [
- "gitlabId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "bitbucketId"
- ],
- "tableTo": "bitbucket",
- "columnsTo": [
- "bitbucketId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_adminId_admin_adminId_fk": {
- "name": "registry_adminId_admin_adminId_fk",
- "tableFrom": "registry",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "slackId"
- ],
- "tableTo": "slack",
- "columnsTo": [
- "slackId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "telegramId"
- ],
- "tableTo": "telegram",
- "columnsTo": [
- "telegramId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "discordId"
- ],
- "tableTo": "discord",
- "columnsTo": [
- "discordId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "emailId"
- ],
- "tableTo": "email",
- "columnsTo": [
- "emailId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "gotifyId"
- ],
- "tableTo": "gotify",
- "columnsTo": [
- "gotifyId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_adminId_admin_adminId_fk": {
- "name": "notification_adminId_admin_adminId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_adminId_admin_adminId_fk": {
- "name": "ssh-key_adminId_admin_adminId_fk",
- "tableFrom": "ssh-key",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_adminId_admin_adminId_fk": {
- "name": "git_provider_adminId_admin_adminId_fk",
- "tableFrom": "git_provider",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_adminId_admin_adminId_fk": {
- "name": "server_adminId_admin_adminId_fk",
- "tableFrom": "server",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "columnsFrom": [
- "sshKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "columnsFrom": [
- "domainId"
- ],
- "tableTo": "domain",
- "columnsTo": [
- "domainId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "columnsFrom": [
- "organization_id"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "columnsFrom": [
- "inviter_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "columnsFrom": [
- "owner_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "columns": [
- "slug"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "views": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0068_snapshot.json b/apps/dokploy/drizzle/meta/0068_snapshot.json
deleted file mode 100644
index 2389356e5..000000000
--- a/apps/dokploy/drizzle/meta/0068_snapshot.json
+++ /dev/null
@@ -1,5329 +0,0 @@
-{
- "id": "c2e134de-9865-4892-a24d-048aa5be22e8",
- "prevId": "54ba08a1-8861-438a-a89d-f01d09a690c2",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "tableTo": "admin",
- "columnsFrom": [
- "adminId"
- ],
- "columnsTo": [
- "adminId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_userId_user_temp_id_fk": {
- "name": "project_userId_user_temp_id_fk",
- "tableFrom": "project",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_userId_user_temp_id_fk": {
- "name": "destination_userId_user_temp_id_fk",
- "tableFrom": "destination",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_userId_user_temp_id_fk": {
- "name": "certificate_userId_user_temp_id_fk",
- "tableFrom": "certificate",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "tableTo": "auth",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_userId_user_temp_id_fk": {
- "name": "registry_userId_user_temp_id_fk",
- "tableFrom": "registry",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_userId_user_temp_id_fk": {
- "name": "notification_userId_user_temp_id_fk",
- "tableFrom": "notification",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_userId_user_temp_id_fk": {
- "name": "ssh-key_userId_user_temp_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_userId_user_temp_id_fk": {
- "name": "git_provider_userId_user_temp_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_userId_user_temp_id_fk": {
- "name": "server_userId_user_temp_id_fk",
- "tableFrom": "server",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0069_snapshot.json b/apps/dokploy/drizzle/meta/0069_snapshot.json
deleted file mode 100644
index 12093eab8..000000000
--- a/apps/dokploy/drizzle/meta/0069_snapshot.json
+++ /dev/null
@@ -1,5337 +0,0 @@
-{
- "id": "e0842a94-530d-4a3c-a6b1-16cf37618b8b",
- "prevId": "c2e134de-9865-4892-a24d-048aa5be22e8",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "tableTo": "admin",
- "columnsFrom": [
- "adminId"
- ],
- "columnsTo": [
- "adminId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_userId_user_temp_id_fk": {
- "name": "project_userId_user_temp_id_fk",
- "tableFrom": "project",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_userId_user_temp_id_fk": {
- "name": "destination_userId_user_temp_id_fk",
- "tableFrom": "destination",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_userId_user_temp_id_fk": {
- "name": "certificate_userId_user_temp_id_fk",
- "tableFrom": "certificate",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "tableTo": "auth",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_userId_user_temp_id_fk": {
- "name": "registry_userId_user_temp_id_fk",
- "tableFrom": "registry",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_userId_user_temp_id_fk": {
- "name": "notification_userId_user_temp_id_fk",
- "tableFrom": "notification",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_userId_user_temp_id_fk": {
- "name": "ssh-key_userId_user_temp_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_userId_user_temp_id_fk": {
- "name": "git_provider_userId_user_temp_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_userId_user_temp_id_fk": {
- "name": "server_userId_user_temp_id_fk",
- "tableFrom": "server",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0070_snapshot.json b/apps/dokploy/drizzle/meta/0070_snapshot.json
deleted file mode 100644
index bc5f2b131..000000000
--- a/apps/dokploy/drizzle/meta/0070_snapshot.json
+++ /dev/null
@@ -1,5489 +0,0 @@
-{
- "id": "8e8626de-fb34-4c11-b9d0-b7a958993fb7",
- "prevId": "e0842a94-530d-4a3c-a6b1-16cf37618b8b",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "tableTo": "admin",
- "columnsFrom": [
- "adminId"
- ],
- "columnsTo": [
- "adminId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_userId_user_temp_id_fk": {
- "name": "project_userId_user_temp_id_fk",
- "tableFrom": "project",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_userId_user_temp_id_fk": {
- "name": "destination_userId_user_temp_id_fk",
- "tableFrom": "destination",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_userId_user_temp_id_fk": {
- "name": "certificate_userId_user_temp_id_fk",
- "tableFrom": "certificate",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "tableTo": "auth",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_userId_user_temp_id_fk": {
- "name": "registry_userId_user_temp_id_fk",
- "tableFrom": "registry",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_userId_user_temp_id_fk": {
- "name": "notification_userId_user_temp_id_fk",
- "tableFrom": "notification",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_userId_user_temp_id_fk": {
- "name": "ssh-key_userId_user_temp_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_userId_user_temp_id_fk": {
- "name": "git_provider_userId_user_temp_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_userId_user_temp_id_fk": {
- "name": "server_userId_user_temp_id_fk",
- "tableFrom": "server",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0071_snapshot.json b/apps/dokploy/drizzle/meta/0071_snapshot.json
deleted file mode 100644
index cd24cb0c6..000000000
--- a/apps/dokploy/drizzle/meta/0071_snapshot.json
+++ /dev/null
@@ -1,5489 +0,0 @@
-{
- "id": "11cb27c0-0f5a-4ec9-98be-5b6f7c5e7799",
- "prevId": "8e8626de-fb34-4c11-b9d0-b7a958993fb7",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "registryId"
- ],
- "tableTo": "registry",
- "columnsTo": [
- "registryId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "githubId"
- ],
- "tableTo": "github",
- "columnsTo": [
- "githubId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "gitlabId"
- ],
- "tableTo": "gitlab",
- "columnsTo": [
- "gitlabId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "bitbucketId"
- ],
- "tableTo": "bitbucket",
- "columnsTo": [
- "bitbucketId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "columnsFrom": [
- "adminId"
- ],
- "tableTo": "admin",
- "columnsTo": [
- "adminId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "columnsFrom": [
- "authId"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "columns": [
- "email"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "columnsFrom": [
- "authId"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "columns": [
- "email"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_userId_user_temp_id_fk": {
- "name": "project_userId_user_temp_id_fk",
- "tableFrom": "project",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "tableTo": "preview_deployments",
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "destinationId"
- ],
- "tableTo": "destination",
- "columnsTo": [
- "destinationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "postgresId"
- ],
- "tableTo": "postgres",
- "columnsTo": [
- "postgresId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mariadbId"
- ],
- "tableTo": "mariadb",
- "columnsTo": [
- "mariadbId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mysqlId"
- ],
- "tableTo": "mysql",
- "columnsTo": [
- "mysqlId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "columnsFrom": [
- "mongoId"
- ],
- "tableTo": "mongo",
- "columnsTo": [
- "mongoId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_userId_user_temp_id_fk": {
- "name": "destination_userId_user_temp_id_fk",
- "tableFrom": "destination",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "tableTo": "preview_deployments",
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "postgresId"
- ],
- "tableTo": "postgres",
- "columnsTo": [
- "postgresId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mariadbId"
- ],
- "tableTo": "mariadb",
- "columnsTo": [
- "mariadbId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mongoId"
- ],
- "tableTo": "mongo",
- "columnsTo": [
- "mongoId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "mysqlId"
- ],
- "tableTo": "mysql",
- "columnsTo": [
- "mysqlId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "redisId"
- ],
- "tableTo": "redis",
- "columnsTo": [
- "redisId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "columnsFrom": [
- "composeId"
- ],
- "tableTo": "compose",
- "columnsTo": [
- "composeId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_userId_user_temp_id_fk": {
- "name": "certificate_userId_user_temp_id_fk",
- "tableFrom": "certificate",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "columns": [
- "certificatePath"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "columns": [
- "token"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "auth",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "columns": [
- "username",
- "applicationId"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "projectId"
- ],
- "tableTo": "project",
- "columnsTo": [
- "projectId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "githubId"
- ],
- "tableTo": "github",
- "columnsTo": [
- "githubId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "gitlabId"
- ],
- "tableTo": "gitlab",
- "columnsTo": [
- "gitlabId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "bitbucketId"
- ],
- "tableTo": "bitbucket",
- "columnsTo": [
- "bitbucketId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "columnsFrom": [
- "serverId"
- ],
- "tableTo": "server",
- "columnsTo": [
- "serverId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_userId_user_temp_id_fk": {
- "name": "registry_userId_user_temp_id_fk",
- "tableFrom": "registry",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "slackId"
- ],
- "tableTo": "slack",
- "columnsTo": [
- "slackId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "telegramId"
- ],
- "tableTo": "telegram",
- "columnsTo": [
- "telegramId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "discordId"
- ],
- "tableTo": "discord",
- "columnsTo": [
- "discordId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "emailId"
- ],
- "tableTo": "email",
- "columnsTo": [
- "emailId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "gotifyId"
- ],
- "tableTo": "gotify",
- "columnsTo": [
- "gotifyId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_userId_user_temp_id_fk": {
- "name": "notification_userId_user_temp_id_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_userId_user_temp_id_fk": {
- "name": "ssh-key_userId_user_temp_id_fk",
- "tableFrom": "ssh-key",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_userId_user_temp_id_fk": {
- "name": "git_provider_userId_user_temp_id_fk",
- "tableFrom": "git_provider",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "columnsFrom": [
- "gitProviderId"
- ],
- "tableTo": "git_provider",
- "columnsTo": [
- "gitProviderId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_userId_user_temp_id_fk": {
- "name": "server_userId_user_temp_id_fk",
- "tableFrom": "server",
- "columnsFrom": [
- "userId"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "columnsFrom": [
- "organizationId"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "columnsFrom": [
- "sshKeyId"
- ],
- "tableTo": "ssh-key",
- "columnsTo": [
- "sshKeyId"
- ],
- "onUpdate": "no action",
- "onDelete": "set null"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "columnsFrom": [
- "applicationId"
- ],
- "tableTo": "application",
- "columnsTo": [
- "applicationId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "columnsFrom": [
- "domainId"
- ],
- "tableTo": "domain",
- "columnsTo": [
- "domainId"
- ],
- "onUpdate": "no action",
- "onDelete": "cascade"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "columns": [
- "appName"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "columnsFrom": [
- "user_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "columnsFrom": [
- "organization_id"
- ],
- "tableTo": "organization",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "columnsFrom": [
- "inviter_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "columnsFrom": [
- "owner_id"
- ],
- "tableTo": "user_temp",
- "columnsTo": [
- "id"
- ],
- "onUpdate": "no action",
- "onDelete": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "columns": [
- "slug"
- ],
- "nullsNotDistinct": false
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "views": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0072_snapshot.json b/apps/dokploy/drizzle/meta/0072_snapshot.json
deleted file mode 100644
index f049dd977..000000000
--- a/apps/dokploy/drizzle/meta/0072_snapshot.json
+++ /dev/null
@@ -1,5337 +0,0 @@
-{
- "id": "4eb71c0e-5bdb-427b-b198-39b1059dcd16",
- "prevId": "11cb27c0-0f5a-4ec9-98be-5b6f7c5e7799",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user": {
- "name": "user",
- "schema": "",
- "columns": {
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "user_adminId_admin_adminId_fk": {
- "name": "user_adminId_admin_adminId_fk",
- "tableFrom": "user",
- "tableTo": "admin",
- "columnsFrom": [
- "adminId"
- ],
- "columnsTo": [
- "adminId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "user_authId_auth_id_fk": {
- "name": "user_authId_auth_id_fk",
- "tableFrom": "user",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.admin": {
- "name": "admin",
- "schema": "",
- "columns": {
- "adminId": {
- "name": "adminId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "authId": {
- "name": "authId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "admin_authId_auth_id_fk": {
- "name": "admin_authId_auth_id_fk",
- "tableFrom": "admin",
- "tableTo": "auth",
- "columnsFrom": [
- "authId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.auth": {
- "name": "auth",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rol": {
- "name": "rol",
- "type": "Roles",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "auth_email_unique": {
- "name": "auth_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session": {
- "name": "session",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp with time zone",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_user_id_auth_id_fk": {
- "name": "session_user_id_auth_id_fk",
- "tableFrom": "session",
- "tableTo": "auth",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.Roles": {
- "name": "Roles",
- "schema": "public",
- "values": [
- "admin",
- "user"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0073_snapshot.json b/apps/dokploy/drizzle/meta/0073_snapshot.json
deleted file mode 100644
index 5ccdef32f..000000000
--- a/apps/dokploy/drizzle/meta/0073_snapshot.json
+++ /dev/null
@@ -1,4878 +0,0 @@
-{
- "id": "e357a19a-dd1e-4843-b567-0c0243ade7a8",
- "prevId": "4eb71c0e-5bdb-427b-b198-39b1059dcd16",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0074_snapshot.json b/apps/dokploy/drizzle/meta/0074_snapshot.json
deleted file mode 100644
index 61353329d..000000000
--- a/apps/dokploy/drizzle/meta/0074_snapshot.json
+++ /dev/null
@@ -1,4878 +0,0 @@
-{
- "id": "9cb79f1e-14c2-4deb-b1ab-a1d038f72356",
- "prevId": "e357a19a-dd1e-4843-b567-0c0243ade7a8",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0075_snapshot.json b/apps/dokploy/drizzle/meta/0075_snapshot.json
deleted file mode 100644
index 71a7e3eae..000000000
--- a/apps/dokploy/drizzle/meta/0075_snapshot.json
+++ /dev/null
@@ -1,4878 +0,0 @@
-{
- "id": "c5e17a87-0aa3-4178-be24-cfa7cde0f75d",
- "prevId": "9cb79f1e-14c2-4deb-b1ab-a1d038f72356",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.application": {
- "name": "application",
- "schema": "",
- "columns": {
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewEnv": {
- "name": "previewEnv",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewBuildArgs": {
- "name": "previewBuildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewWildcard": {
- "name": "previewWildcard",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewPort": {
- "name": "previewPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "previewHttps": {
- "name": "previewHttps",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "previewPath": {
- "name": "previewPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "buildArgs": {
- "name": "buildArgs",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "subtitle": {
- "name": "subtitle",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "buildPath": {
- "name": "buildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBuildPath": {
- "name": "gitlabBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBuildPath": {
- "name": "bitbucketBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBuildPath": {
- "name": "customGitBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerfile": {
- "name": "dockerfile",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerContextPath": {
- "name": "dockerContextPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerBuildStage": {
- "name": "dockerBuildStage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dropBuildPath": {
- "name": "dropBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "healthCheckSwarm": {
- "name": "healthCheckSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "restartPolicySwarm": {
- "name": "restartPolicySwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "placementSwarm": {
- "name": "placementSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "updateConfigSwarm": {
- "name": "updateConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackConfigSwarm": {
- "name": "rollbackConfigSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "modeSwarm": {
- "name": "modeSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "labelsSwarm": {
- "name": "labelsSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "networkSwarm": {
- "name": "networkSwarm",
- "type": "json",
- "primaryKey": false,
- "notNull": false
- },
- "replicas": {
- "name": "replicas",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 1
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "buildType": {
- "name": "buildType",
- "type": "buildType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'nixpacks'"
- },
- "herokuVersion": {
- "name": "herokuVersion",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'24'"
- },
- "publishDirectory": {
- "name": "publishDirectory",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "application_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "application_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "application",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_registryId_registry_registryId_fk": {
- "name": "application_registryId_registry_registryId_fk",
- "tableFrom": "application",
- "tableTo": "registry",
- "columnsFrom": [
- "registryId"
- ],
- "columnsTo": [
- "registryId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_projectId_project_projectId_fk": {
- "name": "application_projectId_project_projectId_fk",
- "tableFrom": "application",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "application_githubId_github_githubId_fk": {
- "name": "application_githubId_github_githubId_fk",
- "tableFrom": "application",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_gitlabId_gitlab_gitlabId_fk": {
- "name": "application_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "application",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "application_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "application",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "application_serverId_server_serverId_fk": {
- "name": "application_serverId_server_serverId_fk",
- "tableFrom": "application",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "application_appName_unique": {
- "name": "application_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.postgres": {
- "name": "postgres",
- "schema": "",
- "columns": {
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "postgres_projectId_project_projectId_fk": {
- "name": "postgres_projectId_project_projectId_fk",
- "tableFrom": "postgres",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "postgres_serverId_server_serverId_fk": {
- "name": "postgres_serverId_server_serverId_fk",
- "tableFrom": "postgres",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "postgres_appName_unique": {
- "name": "postgres_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.user_temp": {
- "name": "user_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "isRegistered": {
- "name": "isRegistered",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "expirationDate": {
- "name": "expirationDate",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false,
- "default": "now()"
- },
- "two_factor_enabled": {
- "name": "two_factor_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email_verified": {
- "name": "email_verified",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "banned": {
- "name": "banned",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "ban_reason": {
- "name": "ban_reason",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ban_expires": {
- "name": "ban_expires",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "serverIp": {
- "name": "serverIp",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "letsEncryptEmail": {
- "name": "letsEncryptEmail",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sshPrivateKey": {
- "name": "sshPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enableLogRotation": {
- "name": "enableLogRotation",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Dokploy\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"retentionDays\":2,\"cronJob\":\"\",\"urlCallback\":\"\",\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- },
- "cleanupCacheApplications": {
- "name": "cleanupCacheApplications",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnPreviews": {
- "name": "cleanupCacheOnPreviews",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cleanupCacheOnCompose": {
- "name": "cleanupCacheOnCompose",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "stripeCustomerId": {
- "name": "stripeCustomerId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "stripeSubscriptionId": {
- "name": "stripeSubscriptionId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serversQuantity": {
- "name": "serversQuantity",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "user_temp_email_unique": {
- "name": "user_temp_email_unique",
- "nullsNotDistinct": false,
- "columns": [
- "email"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.project": {
- "name": "project",
- "schema": "",
- "columns": {
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "project_organizationId_organization_id_fk": {
- "name": "project_organizationId_organization_id_fk",
- "tableFrom": "project",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.domain": {
- "name": "domain",
- "schema": "",
- "columns": {
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "host": {
- "name": "host",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3000
- },
- "path": {
- "name": "path",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "domainType": {
- "name": "domainType",
- "type": "domainType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'application'"
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "certificateType": {
- "name": "certificateType",
- "type": "certificateType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'none'"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "domain_composeId_compose_composeId_fk": {
- "name": "domain_composeId_compose_composeId_fk",
- "tableFrom": "domain",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_applicationId_application_applicationId_fk": {
- "name": "domain_applicationId_application_applicationId_fk",
- "tableFrom": "domain",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "domain_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "domain",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mariadb": {
- "name": "mariadb",
- "schema": "",
- "columns": {
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mariadb_projectId_project_projectId_fk": {
- "name": "mariadb_projectId_project_projectId_fk",
- "tableFrom": "mariadb",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mariadb_serverId_server_serverId_fk": {
- "name": "mariadb_serverId_server_serverId_fk",
- "tableFrom": "mariadb",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mariadb_appName_unique": {
- "name": "mariadb_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mongo": {
- "name": "mongo",
- "schema": "",
- "columns": {
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "replicaSets": {
- "name": "replicaSets",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mongo_projectId_project_projectId_fk": {
- "name": "mongo_projectId_project_projectId_fk",
- "tableFrom": "mongo",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mongo_serverId_server_serverId_fk": {
- "name": "mongo_serverId_server_serverId_fk",
- "tableFrom": "mongo",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mongo_appName_unique": {
- "name": "mongo_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mysql": {
- "name": "mysql",
- "schema": "",
- "columns": {
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "databaseName": {
- "name": "databaseName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseUser": {
- "name": "databaseUser",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databasePassword": {
- "name": "databasePassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "rootPassword": {
- "name": "rootPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mysql_projectId_project_projectId_fk": {
- "name": "mysql_projectId_project_projectId_fk",
- "tableFrom": "mysql",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mysql_serverId_server_serverId_fk": {
- "name": "mysql_serverId_server_serverId_fk",
- "tableFrom": "mysql",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "mysql_appName_unique": {
- "name": "mysql_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.backup": {
- "name": "backup",
- "schema": "",
- "columns": {
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "database": {
- "name": "database",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "backup_destinationId_destination_destinationId_fk": {
- "name": "backup_destinationId_destination_destinationId_fk",
- "tableFrom": "backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_postgresId_postgres_postgresId_fk": {
- "name": "backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mysqlId_mysql_mysqlId_fk": {
- "name": "backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "backup_mongoId_mongo_mongoId_fk": {
- "name": "backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.destination": {
- "name": "destination",
- "schema": "",
- "columns": {
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider": {
- "name": "provider",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "accessKey": {
- "name": "accessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "secretAccessKey": {
- "name": "secretAccessKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "bucket": {
- "name": "bucket",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "region": {
- "name": "region",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "endpoint": {
- "name": "endpoint",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "destination_organizationId_organization_id_fk": {
- "name": "destination_organizationId_organization_id_fk",
- "tableFrom": "destination",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.deployment": {
- "name": "deployment",
- "schema": "",
- "columns": {
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "title": {
- "name": "title",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "deploymentStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'running'"
- },
- "logPath": {
- "name": "logPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "isPreviewDeployment": {
- "name": "isPreviewDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "deployment_applicationId_application_applicationId_fk": {
- "name": "deployment_applicationId_application_applicationId_fk",
- "tableFrom": "deployment",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_composeId_compose_composeId_fk": {
- "name": "deployment_composeId_compose_composeId_fk",
- "tableFrom": "deployment",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_serverId_server_serverId_fk": {
- "name": "deployment_serverId_server_serverId_fk",
- "tableFrom": "deployment",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk": {
- "name": "deployment_previewDeploymentId_preview_deployments_previewDeploymentId_fk",
- "tableFrom": "deployment",
- "tableTo": "preview_deployments",
- "columnsFrom": [
- "previewDeploymentId"
- ],
- "columnsTo": [
- "previewDeploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.mount": {
- "name": "mount",
- "schema": "",
- "columns": {
- "mountId": {
- "name": "mountId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "mountType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "filePath": {
- "name": "filePath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "content": {
- "name": "content",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "mountPath": {
- "name": "mountPath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "postgresId": {
- "name": "postgresId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mariadbId": {
- "name": "mariadbId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mongoId": {
- "name": "mongoId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "mysqlId": {
- "name": "mysqlId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "mount_applicationId_application_applicationId_fk": {
- "name": "mount_applicationId_application_applicationId_fk",
- "tableFrom": "mount",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_postgresId_postgres_postgresId_fk": {
- "name": "mount_postgresId_postgres_postgresId_fk",
- "tableFrom": "mount",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mariadbId_mariadb_mariadbId_fk": {
- "name": "mount_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "mount",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mongoId_mongo_mongoId_fk": {
- "name": "mount_mongoId_mongo_mongoId_fk",
- "tableFrom": "mount",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_mysqlId_mysql_mysqlId_fk": {
- "name": "mount_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "mount",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_redisId_redis_redisId_fk": {
- "name": "mount_redisId_redis_redisId_fk",
- "tableFrom": "mount",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "mount_composeId_compose_composeId_fk": {
- "name": "mount_composeId_compose_composeId_fk",
- "tableFrom": "mount",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.certificate": {
- "name": "certificate",
- "schema": "",
- "columns": {
- "certificateId": {
- "name": "certificateId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificateData": {
- "name": "certificateData",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "certificatePath": {
- "name": "certificatePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "autoRenew": {
- "name": "autoRenew",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "certificate_organizationId_organization_id_fk": {
- "name": "certificate_organizationId_organization_id_fk",
- "tableFrom": "certificate",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "certificate_serverId_server_serverId_fk": {
- "name": "certificate_serverId_server_serverId_fk",
- "tableFrom": "certificate",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "certificate_certificatePath_unique": {
- "name": "certificate_certificatePath_unique",
- "nullsNotDistinct": false,
- "columns": [
- "certificatePath"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.session_temp": {
- "name": "session_temp",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "ip_address": {
- "name": "ip_address",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_agent": {
- "name": "user_agent",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "impersonated_by": {
- "name": "impersonated_by",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "active_organization_id": {
- "name": "active_organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "session_temp_user_id_user_temp_id_fk": {
- "name": "session_temp_user_id_user_temp_id_fk",
- "tableFrom": "session_temp",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "session_temp_token_unique": {
- "name": "session_temp_token_unique",
- "nullsNotDistinct": false,
- "columns": [
- "token"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redirect": {
- "name": "redirect",
- "schema": "",
- "columns": {
- "redirectId": {
- "name": "redirectId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "regex": {
- "name": "regex",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "replacement": {
- "name": "replacement",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "permanent": {
- "name": "permanent",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "uniqueConfigKey": {
- "name": "uniqueConfigKey",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redirect_applicationId_application_applicationId_fk": {
- "name": "redirect_applicationId_application_applicationId_fk",
- "tableFrom": "redirect",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.security": {
- "name": "security",
- "schema": "",
- "columns": {
- "securityId": {
- "name": "securityId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "security_applicationId_application_applicationId_fk": {
- "name": "security_applicationId_application_applicationId_fk",
- "tableFrom": "security",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "security_username_applicationId_unique": {
- "name": "security_username_applicationId_unique",
- "nullsNotDistinct": false,
- "columns": [
- "username",
- "applicationId"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.port": {
- "name": "port",
- "schema": "",
- "columns": {
- "portId": {
- "name": "portId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "publishedPort": {
- "name": "publishedPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "targetPort": {
- "name": "targetPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "protocol": {
- "name": "protocol",
- "type": "protocolType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "port_applicationId_application_applicationId_fk": {
- "name": "port_applicationId_application_applicationId_fk",
- "tableFrom": "port",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.redis": {
- "name": "redis",
- "schema": "",
- "columns": {
- "redisId": {
- "name": "redisId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "dockerImage": {
- "name": "dockerImage",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryReservation": {
- "name": "memoryReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "memoryLimit": {
- "name": "memoryLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuReservation": {
- "name": "cpuReservation",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "cpuLimit": {
- "name": "cpuLimit",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "externalPort": {
- "name": "externalPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationStatus": {
- "name": "applicationStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "redis_projectId_project_projectId_fk": {
- "name": "redis_projectId_project_projectId_fk",
- "tableFrom": "redis",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "redis_serverId_server_serverId_fk": {
- "name": "redis_serverId_server_serverId_fk",
- "tableFrom": "redis",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "redis_appName_unique": {
- "name": "redis_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.compose": {
- "name": "compose",
- "schema": "",
- "columns": {
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "composeFile": {
- "name": "composeFile",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "refreshToken": {
- "name": "refreshToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "sourceType": {
- "name": "sourceType",
- "type": "sourceTypeCompose",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "composeType": {
- "name": "composeType",
- "type": "composeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'docker-compose'"
- },
- "repository": {
- "name": "repository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner": {
- "name": "owner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "autoDeploy": {
- "name": "autoDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabProjectId": {
- "name": "gitlabProjectId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabRepository": {
- "name": "gitlabRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabOwner": {
- "name": "gitlabOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabBranch": {
- "name": "gitlabBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabPathNamespace": {
- "name": "gitlabPathNamespace",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketRepository": {
- "name": "bitbucketRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketOwner": {
- "name": "bitbucketOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketBranch": {
- "name": "bitbucketBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitUrl": {
- "name": "customGitUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitBranch": {
- "name": "customGitBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "customGitSSHKeyId": {
- "name": "customGitSSHKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "composePath": {
- "name": "composePath",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'./docker-compose.yml'"
- },
- "suffix": {
- "name": "suffix",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "randomize": {
- "name": "randomize",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "isolatedDeployment": {
- "name": "isolatedDeployment",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "composeStatus": {
- "name": "composeStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "projectId": {
- "name": "projectId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk": {
- "name": "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "compose",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "customGitSSHKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_projectId_project_projectId_fk": {
- "name": "compose_projectId_project_projectId_fk",
- "tableFrom": "compose",
- "tableTo": "project",
- "columnsFrom": [
- "projectId"
- ],
- "columnsTo": [
- "projectId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "compose_githubId_github_githubId_fk": {
- "name": "compose_githubId_github_githubId_fk",
- "tableFrom": "compose",
- "tableTo": "github",
- "columnsFrom": [
- "githubId"
- ],
- "columnsTo": [
- "githubId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_gitlabId_gitlab_gitlabId_fk": {
- "name": "compose_gitlabId_gitlab_gitlabId_fk",
- "tableFrom": "compose",
- "tableTo": "gitlab",
- "columnsFrom": [
- "gitlabId"
- ],
- "columnsTo": [
- "gitlabId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_bitbucketId_bitbucket_bitbucketId_fk": {
- "name": "compose_bitbucketId_bitbucket_bitbucketId_fk",
- "tableFrom": "compose",
- "tableTo": "bitbucket",
- "columnsFrom": [
- "bitbucketId"
- ],
- "columnsTo": [
- "bitbucketId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- },
- "compose_serverId_server_serverId_fk": {
- "name": "compose_serverId_server_serverId_fk",
- "tableFrom": "compose",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.registry": {
- "name": "registry",
- "schema": "",
- "columns": {
- "registryId": {
- "name": "registryId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "registryName": {
- "name": "registryName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "imagePrefix": {
- "name": "imagePrefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "registryUrl": {
- "name": "registryUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "selfHosted": {
- "name": "selfHosted",
- "type": "RegistryType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'cloud'"
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "registry_organizationId_organization_id_fk": {
- "name": "registry_organizationId_organization_id_fk",
- "tableFrom": "registry",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.discord": {
- "name": "discord",
- "schema": "",
- "columns": {
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.email": {
- "name": "email",
- "schema": "",
- "columns": {
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "smtpServer": {
- "name": "smtpServer",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "smtpPort": {
- "name": "smtpPort",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fromAddress": {
- "name": "fromAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "toAddress": {
- "name": "toAddress",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gotify": {
- "name": "gotify",
- "schema": "",
- "columns": {
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "serverUrl": {
- "name": "serverUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appToken": {
- "name": "appToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "priority": {
- "name": "priority",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 5
- },
- "decoration": {
- "name": "decoration",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.notification": {
- "name": "notification",
- "schema": "",
- "columns": {
- "notificationId": {
- "name": "notificationId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appDeploy": {
- "name": "appDeploy",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "appBuildError": {
- "name": "appBuildError",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "databaseBackup": {
- "name": "databaseBackup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dokployRestart": {
- "name": "dokployRestart",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "dockerCleanup": {
- "name": "dockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "serverThreshold": {
- "name": "serverThreshold",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "notificationType": {
- "name": "notificationType",
- "type": "notificationType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "discordId": {
- "name": "discordId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "emailId": {
- "name": "emailId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gotifyId": {
- "name": "gotifyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "notification_slackId_slack_slackId_fk": {
- "name": "notification_slackId_slack_slackId_fk",
- "tableFrom": "notification",
- "tableTo": "slack",
- "columnsFrom": [
- "slackId"
- ],
- "columnsTo": [
- "slackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_telegramId_telegram_telegramId_fk": {
- "name": "notification_telegramId_telegram_telegramId_fk",
- "tableFrom": "notification",
- "tableTo": "telegram",
- "columnsFrom": [
- "telegramId"
- ],
- "columnsTo": [
- "telegramId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_discordId_discord_discordId_fk": {
- "name": "notification_discordId_discord_discordId_fk",
- "tableFrom": "notification",
- "tableTo": "discord",
- "columnsFrom": [
- "discordId"
- ],
- "columnsTo": [
- "discordId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_emailId_email_emailId_fk": {
- "name": "notification_emailId_email_emailId_fk",
- "tableFrom": "notification",
- "tableTo": "email",
- "columnsFrom": [
- "emailId"
- ],
- "columnsTo": [
- "emailId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_gotifyId_gotify_gotifyId_fk": {
- "name": "notification_gotifyId_gotify_gotifyId_fk",
- "tableFrom": "notification",
- "tableTo": "gotify",
- "columnsFrom": [
- "gotifyId"
- ],
- "columnsTo": [
- "gotifyId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "notification_organizationId_organization_id_fk": {
- "name": "notification_organizationId_organization_id_fk",
- "tableFrom": "notification",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.slack": {
- "name": "slack",
- "schema": "",
- "columns": {
- "slackId": {
- "name": "slackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "webhookUrl": {
- "name": "webhookUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "channel": {
- "name": "channel",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.telegram": {
- "name": "telegram",
- "schema": "",
- "columns": {
- "telegramId": {
- "name": "telegramId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "botToken": {
- "name": "botToken",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "chatId": {
- "name": "chatId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.ssh-key": {
- "name": "ssh-key",
- "schema": "",
- "columns": {
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "privateKey": {
- "name": "privateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "publicKey": {
- "name": "publicKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "lastUsedAt": {
- "name": "lastUsedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ssh-key_organizationId_organization_id_fk": {
- "name": "ssh-key_organizationId_organization_id_fk",
- "tableFrom": "ssh-key",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.git_provider": {
- "name": "git_provider",
- "schema": "",
- "columns": {
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "providerType": {
- "name": "providerType",
- "type": "gitProviderType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'github'"
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "git_provider_organizationId_organization_id_fk": {
- "name": "git_provider_organizationId_organization_id_fk",
- "tableFrom": "git_provider",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.bitbucket": {
- "name": "bitbucket",
- "schema": "",
- "columns": {
- "bitbucketId": {
- "name": "bitbucketId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "bitbucketUsername": {
- "name": "bitbucketUsername",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "appPassword": {
- "name": "appPassword",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "bitbucketWorkspaceName": {
- "name": "bitbucketWorkspaceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "bitbucket_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "bitbucket_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "bitbucket",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.github": {
- "name": "github",
- "schema": "",
- "columns": {
- "githubId": {
- "name": "githubId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "githubAppName": {
- "name": "githubAppName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubAppId": {
- "name": "githubAppId",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientId": {
- "name": "githubClientId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubClientSecret": {
- "name": "githubClientSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubInstallationId": {
- "name": "githubInstallationId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubPrivateKey": {
- "name": "githubPrivateKey",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "githubWebhookSecret": {
- "name": "githubWebhookSecret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "github_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "github_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "github",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.gitlab": {
- "name": "gitlab",
- "schema": "",
- "columns": {
- "gitlabId": {
- "name": "gitlabId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "gitlabUrl": {
- "name": "gitlabUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitlab.com'"
- },
- "application_id": {
- "name": "application_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "group_name": {
- "name": "group_name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitlab_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitlab_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitlab",
- "tableTo": "git_provider",
- "columnsFrom": [
- "gitProviderId"
- ],
- "columnsTo": [
- "gitProviderId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.server": {
- "name": "server",
- "schema": "",
- "columns": {
- "serverId": {
- "name": "serverId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "description": {
- "name": "description",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "ipAddress": {
- "name": "ipAddress",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "port": {
- "name": "port",
- "type": "integer",
- "primaryKey": false,
- "notNull": true
- },
- "username": {
- "name": "username",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'root'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "enableDockerCleanup": {
- "name": "enableDockerCleanup",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serverStatus": {
- "name": "serverStatus",
- "type": "serverStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'active'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "sshKeyId": {
- "name": "sshKeyId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metricsConfig": {
- "name": "metricsConfig",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": true,
- "default": "'{\"server\":{\"type\":\"Remote\",\"refreshRate\":60,\"port\":4500,\"token\":\"\",\"urlCallback\":\"\",\"cronJob\":\"\",\"retentionDays\":2,\"thresholds\":{\"cpu\":0,\"memory\":0}},\"containers\":{\"refreshRate\":60,\"services\":{\"include\":[],\"exclude\":[]}}}'::jsonb"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "server_organizationId_organization_id_fk": {
- "name": "server_organizationId_organization_id_fk",
- "tableFrom": "server",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "server_sshKeyId_ssh-key_sshKeyId_fk": {
- "name": "server_sshKeyId_ssh-key_sshKeyId_fk",
- "tableFrom": "server",
- "tableTo": "ssh-key",
- "columnsFrom": [
- "sshKeyId"
- ],
- "columnsTo": [
- "sshKeyId"
- ],
- "onDelete": "set null",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.preview_deployments": {
- "name": "preview_deployments",
- "schema": "",
- "columns": {
- "previewDeploymentId": {
- "name": "previewDeploymentId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "branch": {
- "name": "branch",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestId": {
- "name": "pullRequestId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestNumber": {
- "name": "pullRequestNumber",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestURL": {
- "name": "pullRequestURL",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestTitle": {
- "name": "pullRequestTitle",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "pullRequestCommentId": {
- "name": "pullRequestCommentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "previewStatus": {
- "name": "previewStatus",
- "type": "applicationStatus",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'idle'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "applicationId": {
- "name": "applicationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "domainId": {
- "name": "domainId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expiresAt": {
- "name": "expiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "preview_deployments_applicationId_application_applicationId_fk": {
- "name": "preview_deployments_applicationId_application_applicationId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "preview_deployments_domainId_domain_domainId_fk": {
- "name": "preview_deployments_domainId_domain_domainId_fk",
- "tableFrom": "preview_deployments",
- "tableTo": "domain",
- "columnsFrom": [
- "domainId"
- ],
- "columnsTo": [
- "domainId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "preview_deployments_appName_unique": {
- "name": "preview_deployments_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.account": {
- "name": "account",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "account_id": {
- "name": "account_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "provider_id": {
- "name": "provider_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "access_token": {
- "name": "access_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token": {
- "name": "refresh_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "id_token": {
- "name": "id_token",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "access_token_expires_at": {
- "name": "access_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "refresh_token_expires_at": {
- "name": "refresh_token_expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "scope": {
- "name": "scope",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "password": {
- "name": "password",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "is2FAEnabled": {
- "name": "is2FAEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "resetPasswordToken": {
- "name": "resetPasswordToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "resetPasswordExpiresAt": {
- "name": "resetPasswordExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationToken": {
- "name": "confirmationToken",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "confirmationExpiresAt": {
- "name": "confirmationExpiresAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "account_user_id_user_temp_id_fk": {
- "name": "account_user_id_user_temp_id_fk",
- "tableFrom": "account",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.invitation": {
- "name": "invitation",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "email": {
- "name": "email",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "status": {
- "name": "status",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "inviter_id": {
- "name": "inviter_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "invitation_organization_id_organization_id_fk": {
- "name": "invitation_organization_id_organization_id_fk",
- "tableFrom": "invitation",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "invitation_inviter_id_user_temp_id_fk": {
- "name": "invitation_inviter_id_user_temp_id_fk",
- "tableFrom": "invitation",
- "tableTo": "user_temp",
- "columnsFrom": [
- "inviter_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.member": {
- "name": "member",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "organization_id": {
- "name": "organization_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "canCreateProjects": {
- "name": "canCreateProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToSSHKeys": {
- "name": "canAccessToSSHKeys",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canCreateServices": {
- "name": "canCreateServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteProjects": {
- "name": "canDeleteProjects",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canDeleteServices": {
- "name": "canDeleteServices",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToDocker": {
- "name": "canAccessToDocker",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToAPI": {
- "name": "canAccessToAPI",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToGitProviders": {
- "name": "canAccessToGitProviders",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "canAccessToTraefikFiles": {
- "name": "canAccessToTraefikFiles",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "accesedProjects": {
- "name": "accesedProjects",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- },
- "accesedServices": {
- "name": "accesedServices",
- "type": "text[]",
- "primaryKey": false,
- "notNull": true,
- "default": "ARRAY[]::text[]"
- }
- },
- "indexes": {},
- "foreignKeys": {
- "member_organization_id_organization_id_fk": {
- "name": "member_organization_id_organization_id_fk",
- "tableFrom": "member",
- "tableTo": "organization",
- "columnsFrom": [
- "organization_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- },
- "member_user_id_user_temp_id_fk": {
- "name": "member_user_id_user_temp_id_fk",
- "tableFrom": "member",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.organization": {
- "name": "organization",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "slug": {
- "name": "slug",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "logo": {
- "name": "logo",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "owner_id": {
- "name": "owner_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "organization_owner_id_user_temp_id_fk": {
- "name": "organization_owner_id_user_temp_id_fk",
- "tableFrom": "organization",
- "tableTo": "user_temp",
- "columnsFrom": [
- "owner_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "organization_slug_unique": {
- "name": "organization_slug_unique",
- "nullsNotDistinct": false,
- "columns": [
- "slug"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.two_factor": {
- "name": "two_factor",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "secret": {
- "name": "secret",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "backup_codes": {
- "name": "backup_codes",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "two_factor_user_id_user_temp_id_fk": {
- "name": "two_factor_user_id_user_temp_id_fk",
- "tableFrom": "two_factor",
- "tableTo": "user_temp",
- "columnsFrom": [
- "user_id"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.verification": {
- "name": "verification",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "identifier": {
- "name": "identifier",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "value": {
- "name": "value",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo"
- ]
- },
- "public.deploymentStatus": {
- "name": "deploymentStatus",
- "schema": "public",
- "values": [
- "running",
- "done",
- "error"
- ]
- },
- "public.mountType": {
- "name": "mountType",
- "schema": "public",
- "values": [
- "bind",
- "volume",
- "file"
- ]
- },
- "public.serviceType": {
- "name": "serviceType",
- "schema": "public",
- "values": [
- "application",
- "postgres",
- "mysql",
- "mariadb",
- "mongo",
- "redis",
- "compose"
- ]
- },
- "public.protocolType": {
- "name": "protocolType",
- "schema": "public",
- "values": [
- "tcp",
- "udp"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "raw"
- ]
- },
- "public.RegistryType": {
- "name": "RegistryType",
- "schema": "public",
- "values": [
- "selfHosted",
- "cloud"
- ]
- },
- "public.notificationType": {
- "name": "notificationType",
- "schema": "public",
- "values": [
- "slack",
- "telegram",
- "discord",
- "email",
- "gotify"
- ]
- },
- "public.gitProviderType": {
- "name": "gitProviderType",
- "schema": "public",
- "values": [
- "github",
- "gitlab",
- "bitbucket"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/_journal.json b/apps/dokploy/drizzle/meta/_journal.json
index 674994c1d..8bf49b3a0 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -470,69 +470,6 @@
"when": 1739426913392,
"tag": "0066_yielding_echo",
"breakpoints": true
- },
- {
- "idx": 67,
- "version": "7",
- "when": 1739427057545,
- "tag": "0067_migrate-data",
- "breakpoints": true
- },
- {
- "idx": 68,
- "version": "7",
- "when": 1739428942964,
- "tag": "0068_sour_professor_monster",
- "breakpoints": true
- },
- {
- "idx": 69,
- "version": "7",
- "when": 1739664410814,
- "tag": "0069_broad_ken_ellis",
- "breakpoints": true
- },
- {
- "idx": 70,
- "version": "7",
- "when": 1739671869809,
- "tag": "0070_nervous_vivisector",
- "breakpoints": true
- },
- {
- "idx": 71,
- "version": "7",
- "when": 1739671878698,
- "tag": "0071_migrate-data-projects",
- "breakpoints": true
- },
- {
- "idx": 72,
- "version": "7",
- "when": 1739672367223,
- "tag": "0072_lazy_pixie",
- "breakpoints": true
- },
- {
- "idx": 73,
- "version": "7",
- "when": 1739740193879,
- "tag": "0073_polite_miss_america",
- "breakpoints": true
- },
- {
- "idx": 74,
- "version": "7",
- "when": 1739773539709,
- "tag": "0074_lowly_jack_power",
- "breakpoints": true
- },
- {
- "idx": 75,
- "version": "7",
- "when": 1739781534192,
- "tag": "0075_heavy_metal_master",
- "breakpoints": true
}
]
}
\ No newline at end of file
From 24c9d3f7ad53bd86806f3c693ab5476e5b8fcb29 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 21 Feb 2025 00:30:55 -0600
Subject: [PATCH 50/89] refactor: update user permissions and API queries
---
.../settings/users/add-permissions.tsx | 2 +-
apps/dokploy/drizzle/0066_yielding_echo.sql | 16 +++++-----
apps/dokploy/drizzle/meta/0066_snapshot.json | 14 ++++-----
apps/dokploy/server/api/routers/user.ts | 31 ++++++++++++-------
packages/server/src/db/schema/user.ts | 29 +++++++++--------
5 files changed, 50 insertions(+), 42 deletions(-)
diff --git a/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx b/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
index 6366e9cf8..51d73b1f9 100644
--- a/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
@@ -52,7 +52,7 @@ interface Props {
export const AddUserPermissions = ({ userId }: Props) => {
const { data: projects } = api.project.all.useQuery();
- const { data, refetch } = api.auth.one.useQuery(
+ const { data, refetch } = api.user.one.useQuery(
{
userId,
},
diff --git a/apps/dokploy/drizzle/0066_yielding_echo.sql b/apps/dokploy/drizzle/0066_yielding_echo.sql
index f4877cf66..4fd425387 100644
--- a/apps/dokploy/drizzle/0066_yielding_echo.sql
+++ b/apps/dokploy/drizzle/0066_yielding_echo.sql
@@ -1,7 +1,6 @@
CREATE TABLE "user_temp" (
"id" text PRIMARY KEY NOT NULL,
"name" text DEFAULT '' NOT NULL,
- "token" text NOT NULL,
"isRegistered" boolean DEFAULT false NOT NULL,
"expirationDate" text NOT NULL,
"createdAt" text NOT NULL,
@@ -82,6 +81,7 @@ CREATE TABLE "member" (
"user_id" text NOT NULL,
"role" text NOT NULL,
"created_at" timestamp NOT NULL,
+ "token" text NOT NULL,
"canCreateProjects" boolean DEFAULT false NOT NULL,
"canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
"canCreateServices" boolean DEFAULT false NOT NULL,
@@ -148,7 +148,6 @@ WITH inserted_users AS (
INSERT INTO user_temp (
id,
email,
- token,
"email_verified",
"updated_at",
"serverIp",
@@ -174,7 +173,6 @@ WITH inserted_users AS (
SELECT
a."adminId",
auth.email,
- COALESCE(auth.token, ''),
true,
CURRENT_TIMESTAMP,
a."serverIp",
@@ -247,7 +245,6 @@ inserted_members AS (
INSERT INTO user_temp (
id,
email,
- token,
"email_verified",
"updated_at",
image,
@@ -258,7 +255,6 @@ inserted_members AS (
SELECT
u."userId",
auth.email,
- COALESCE(u.token, ''),
true,
CURRENT_TIMESTAMP,
auth.image,
@@ -302,6 +298,7 @@ inserted_admin_members AS (
"user_id",
role,
"created_at",
+ "token",
"canAccessToAPI",
"canAccessToDocker",
"canAccessToGitProviders",
@@ -320,6 +317,7 @@ inserted_admin_members AS (
a."adminId",
'owner',
NOW(),
+ COALESCE(auth.token, ''),
true, -- Los admins tienen todos los permisos por defecto
true,
true,
@@ -333,6 +331,7 @@ inserted_admin_members AS (
'{}'
FROM admin a
JOIN inserted_orgs o ON o."owner_id" = a."adminId"
+ JOIN auth ON auth.id = a."authId"
RETURNING *
)
-- Insertar miembros regulares en las organizaciones
@@ -342,6 +341,7 @@ INSERT INTO member (
"user_id",
role,
"created_at",
+ "token",
"canAccessToAPI",
"canAccessToDocker",
"canAccessToGitProviders",
@@ -360,6 +360,7 @@ SELECT
u."userId",
'member',
NOW(),
+ COALESCE(auth.token, ''),
COALESCE(u."canAccessToAPI", false),
COALESCE(u."canAccessToDocker", false),
COALESCE(u."canAccessToGitProviders", false),
@@ -373,7 +374,8 @@ SELECT
COALESCE(u."accesedServices", '{}')
FROM "user" u
JOIN admin a ON u."adminId" = a."adminId"
-JOIN inserted_orgs o ON o."owner_id" = a."adminId";
+JOIN inserted_orgs o ON o."owner_id" = a."adminId"
+JOIN auth ON auth.id = u."authId";
-- Migration tables foreign keys
@@ -411,7 +413,7 @@ ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk"
ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
-ALTER TABLE "user_temp" ALTER COLUMN "token" SET DEFAULT '';--> statement-breakpoint
+ALTER TABLE "member" ALTER COLUMN "token" SET DEFAULT '';--> statement-breakpoint
ALTER TABLE "user_temp" ADD COLUMN "created_at" timestamp DEFAULT now();
diff --git a/apps/dokploy/drizzle/meta/0066_snapshot.json b/apps/dokploy/drizzle/meta/0066_snapshot.json
index 71a7e3eae..2264814c2 100644
--- a/apps/dokploy/drizzle/meta/0066_snapshot.json
+++ b/apps/dokploy/drizzle/meta/0066_snapshot.json
@@ -748,13 +748,6 @@
"notNull": true,
"default": "''"
},
- "token": {
- "name": "token",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
"isRegistered": {
"name": "isRegistered",
"type": "boolean",
@@ -4494,6 +4487,13 @@
"primaryKey": false,
"notNull": true,
"default": "ARRAY[]::text[]"
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
}
},
"indexes": {},
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index c0717a924..6b4e8eded 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -18,7 +18,7 @@ import {
member,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { and, eq } from "drizzle-orm";
+import { and, asc, desc, eq } from "drizzle-orm";
import { z } from "zod";
import {
adminProcedure,
@@ -33,6 +33,7 @@ export const userRouter = createTRPCRouter({
with: {
user: true,
},
+ orderBy: [asc(member.createdAt)],
});
}),
one: protectedProcedure
@@ -42,14 +43,17 @@ export const userRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- const user = await findUserById(input.userId);
- // if (user.adminId !== ctx.user.adminId) {
- // throw new TRPCError({
- // code: "UNAUTHORIZED",
- // message: "You are not allowed to access this user",
- // });
- // }
- return user;
+ const memberResult = await db.query.member.findFirst({
+ where: and(
+ eq(member.userId, input.userId),
+ eq(member.organizationId, ctx.session?.activeOrganizationId || ""),
+ ),
+ with: {
+ user: true,
+ },
+ });
+
+ return memberResult;
}),
get: protectedProcedure.query(async ({ ctx }) => {
const memberResult = await db.query.member.findFirst({
@@ -111,9 +115,12 @@ export const userRouter = createTRPCRouter({
});
}
- await updateUser(user.id, {
- ...input,
- });
+ await db
+ .update(member)
+ .set({
+ ...input,
+ })
+ .where(eq(member.userId, input.id));
} catch (error) {
throw error;
}
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index d1ebf9df8..5860875f6 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -29,7 +29,6 @@ export const users_temp = pgTable("user_temp", {
.primaryKey()
.$defaultFn(() => nanoid()),
name: text("name").notNull().default(""),
- token: text("token").notNull().default(""),
isRegistered: boolean("isRegistered").notNull().default(false),
expirationDate: text("expirationDate")
.notNull()
@@ -128,16 +127,7 @@ export const usersRelations = relations(users_temp, ({ one, many }) => ({
const createSchema = createInsertSchema(users_temp, {
id: z.string().min(1),
- token: z.string().min(1),
isRegistered: z.boolean().optional(),
- // accessedProjects: z.array(z.string()).optional(),
- // accessedServices: z.array(z.string()).optional(),
- // canCreateProjects: z.boolean().optional(),
- // canCreateServices: z.boolean().optional(),
- // canDeleteProjects: z.boolean().optional(),
- // canDeleteServices: z.boolean().optional(),
- // canAccessToDocker: z.boolean().optional(),
- // canAccessToTraefikFiles: z.boolean().optional(),
});
export const apiCreateUserInvitation = createSchema.pick({}).extend({
@@ -150,11 +140,7 @@ export const apiRemoveUser = createSchema
})
.required();
-export const apiFindOneToken = createSchema
- .pick({
- token: true,
- })
- .required();
+export const apiFindOneToken = createSchema.pick({}).required();
export const apiAssignPermissions = createSchema
.pick({
@@ -171,6 +157,19 @@ export const apiAssignPermissions = createSchema
// canAccessToSSHKeys: true,
// canAccessToGitProviders: true,
})
+ .extend({
+ accessedProjects: z.array(z.string()).optional(),
+ accessedServices: z.array(z.string()).optional(),
+ canCreateProjects: z.boolean().optional(),
+ canCreateServices: z.boolean().optional(),
+ canDeleteProjects: z.boolean().optional(),
+ canDeleteServices: z.boolean().optional(),
+ canAccessToDocker: z.boolean().optional(),
+ canAccessToTraefikFiles: z.boolean().optional(),
+ canAccessToAPI: z.boolean().optional(),
+ canAccessToSSHKeys: z.boolean().optional(),
+ canAccessToGitProviders: z.boolean().optional(),
+ })
.required();
export const apiFindOneUser = createSchema
From a317f0c4ccb4dff23ecf69b85f40be37f58744b8 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 21 Feb 2025 00:40:35 -0600
Subject: [PATCH 51/89] refactor: simplify user permission checks across
application
---
.../components/dashboard/projects/show.tsx | 4 +--
apps/dokploy/components/layouts/user-nav.tsx | 5 ++--
apps/dokploy/pages/dashboard/docker.tsx | 2 +-
.../pages/dashboard/project/[projectId].tsx | 2 +-
.../services/application/[applicationId].tsx | 3 +--
.../services/compose/[composeId].tsx | 3 +--
.../services/mariadb/[mariadbId].tsx | 3 +--
.../[projectId]/services/mongo/[mongoId].tsx | 3 +--
.../[projectId]/services/mysql/[mysqlId].tsx | 3 +--
.../services/postgres/[postgresId].tsx | 3 +--
.../[projectId]/services/redis/[redisId].tsx | 3 +--
.../dashboard/settings/git-providers.tsx | 2 +-
.../pages/dashboard/settings/profile.tsx | 4 +--
.../pages/dashboard/settings/ssh-keys.tsx | 2 +-
apps/dokploy/pages/dashboard/swarm.tsx | 2 +-
apps/dokploy/pages/dashboard/traefik.tsx | 2 +-
apps/dokploy/pages/swagger.tsx | 2 +-
apps/dokploy/server/api/routers/project.ts | 11 +++++---
packages/server/src/services/user.ts | 27 +++++++++++++++++--
19 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx
index a8c3ed5c1..188ee60d9 100644
--- a/apps/dokploy/components/dashboard/projects/show.tsx
+++ b/apps/dokploy/components/dashboard/projects/show.tsx
@@ -83,7 +83,7 @@ export const ShowProjects = () => {
- {(auth?.role === "owner" || auth?.user?.canCreateProjects) && (
+ {(auth?.role === "owner" || auth?.canCreateProjects) && (
@@ -286,7 +286,7 @@ export const ShowProjects = () => {
onClick={(e) => e.stopPropagation()}
>
{(auth?.role === "owner" ||
- auth?.user?.canDeleteProjects) && (
+ auth?.canDeleteProjects) && (
{
>
Monitoring
- {(data?.role === "owner" ||
- data?.user?.canAccessToTraefikFiles) && (
+ {(data?.role === "owner" || data?.canAccessToTraefikFiles) && (
{
@@ -103,7 +102,7 @@ export const UserNav = () => {
Traefik
)}
- {(data?.role === "owner" || data?.user?.canAccessToDocker) && (
+ {(data?.role === "owner" || data?.canAccessToDocker) && (
{
diff --git a/apps/dokploy/pages/dashboard/docker.tsx b/apps/dokploy/pages/dashboard/docker.tsx
index fee202fce..5685dcfc5 100644
--- a/apps/dokploy/pages/dashboard/docker.tsx
+++ b/apps/dokploy/pages/dashboard/docker.tsx
@@ -58,7 +58,7 @@ export async function getServerSideProps(
userId: user.id,
});
- if (!userR.canAccessToDocker) {
+ if (!userR?.canAccessToDocker) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId].tsx b/apps/dokploy/pages/dashboard/project/[projectId].tsx
index 4f42ad061..f85aa9ee8 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId].tsx
@@ -328,7 +328,7 @@ const Project = (
{data?.description}
- {(auth?.role === "owner" || auth?.user?.canCreateServices) && (
+ {(auth?.role === "owner" || auth?.canCreateServices) && (
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
index b78e750c3..7eebf7083 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -178,8 +178,7 @@ const Service = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
index cceda8858..46c9864b4 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -173,8 +173,7 @@ const Service = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
index 788846e1d..6aa7677a3 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
@@ -147,8 +147,7 @@ const Mariadb = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
index f03c4dfc4..2e3aae31f 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
@@ -148,8 +148,7 @@ const Mongo = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
index 52e2cd072..3e75603dd 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
@@ -148,8 +148,7 @@ const MySql = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
index 8ff2044b5..dd0c312d0 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
@@ -147,8 +147,7 @@ const Postgresql = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
index 9ad8d53c2..c7e5643a6 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
@@ -147,8 +147,7 @@ const Redis = (
- {(auth?.role === "owner" ||
- auth?.user?.canDeleteServices) && (
+ {(auth?.role === "owner" || auth?.canDeleteServices) && (
)}
diff --git a/apps/dokploy/pages/dashboard/settings/git-providers.tsx b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
index cfded9915..7bacde246 100644
--- a/apps/dokploy/pages/dashboard/settings/git-providers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
@@ -54,7 +54,7 @@ export async function getServerSideProps(
userId: user.id,
});
- if (!userR.canAccessToGitProviders) {
+ if (!userR?.canAccessToGitProviders) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/pages/dashboard/settings/profile.tsx b/apps/dokploy/pages/dashboard/settings/profile.tsx
index da0dec728..79a3366d4 100644
--- a/apps/dokploy/pages/dashboard/settings/profile.tsx
+++ b/apps/dokploy/pages/dashboard/settings/profile.tsx
@@ -20,9 +20,7 @@ const Page = () => {
- {(data?.user?.canAccessToAPI || data?.role === "owner") && (
-
- )}
+ {(data?.canAccessToAPI || data?.role === "owner") &&
}
{isCloud &&
}
diff --git a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
index c97df7ba1..8c5082e39 100644
--- a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
+++ b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
@@ -55,7 +55,7 @@ export async function getServerSideProps(
userId: user.id,
});
- if (!userR.canAccessToSSHKeys) {
+ if (!userR?.canAccessToSSHKeys) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/pages/dashboard/swarm.tsx b/apps/dokploy/pages/dashboard/swarm.tsx
index 3b59c47b0..c693fd8cf 100644
--- a/apps/dokploy/pages/dashboard/swarm.tsx
+++ b/apps/dokploy/pages/dashboard/swarm.tsx
@@ -58,7 +58,7 @@ export async function getServerSideProps(
userId: user.id,
});
- if (!userR.canAccessToDocker) {
+ if (!userR?.canAccessToDocker) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/pages/dashboard/traefik.tsx b/apps/dokploy/pages/dashboard/traefik.tsx
index 8dcd3f084..3153e80d3 100644
--- a/apps/dokploy/pages/dashboard/traefik.tsx
+++ b/apps/dokploy/pages/dashboard/traefik.tsx
@@ -58,7 +58,7 @@ export async function getServerSideProps(
userId: user.id,
});
- if (!userR.canAccessToTraefikFiles) {
+ if (!userR?.canAccessToTraefikFiles) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/pages/swagger.tsx b/apps/dokploy/pages/swagger.tsx
index e4a6fac8d..3d8cc01d9 100644
--- a/apps/dokploy/pages/swagger.tsx
+++ b/apps/dokploy/pages/swagger.tsx
@@ -63,7 +63,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
userId: user.id,
});
- if (!userR.canAccessToAPI) {
+ if (!userR?.canAccessToAPI) {
return {
redirect: {
permanent: true,
diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts
index 5fc79f437..e3c24e538 100644
--- a/apps/dokploy/server/api/routers/project.ts
+++ b/apps/dokploy/server/api/routers/project.ts
@@ -8,6 +8,7 @@ import {
applications,
compose,
mariadb,
+ member,
mongo,
mysql,
postgres,
@@ -29,8 +30,8 @@ import {
findUserByAuthId,
findUserById,
updateProjectById,
+ findMemberById,
} from "@dokploy/server";
-
export const projectRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateProject)
@@ -71,7 +72,10 @@ export const projectRouter = createTRPCRouter({
.input(apiFindOneProject)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- const { accessedServices } = await findUserById(ctx.user.id);
+ const { accessedServices } = await findMemberById(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
await checkProjectAccess(ctx.user.id, "access", input.projectId);
@@ -129,8 +133,9 @@ export const projectRouter = createTRPCRouter({
all: protectedProcedure.query(async ({ ctx }) => {
// console.log(ctx.user);
if (ctx.user.rol === "member") {
- const { accessedProjects, accessedServices } = await findUserById(
+ const { accessedProjects, accessedServices } = await findMemberById(
ctx.user.id,
+ ctx.session.activeOrganizationId,
);
if (accessedProjects.length === 0) {
diff --git a/packages/server/src/services/user.ts b/packages/server/src/services/user.ts
index 170af9084..9351a0031 100644
--- a/packages/server/src/services/user.ts
+++ b/packages/server/src/services/user.ts
@@ -1,7 +1,7 @@
import { db } from "@dokploy/server/db";
-import type { users_temp } from "@dokploy/server/db/schema";
+import { type users_temp, member } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { eq } from "drizzle-orm";
+import { and, eq } from "drizzle-orm";
import { findUserById } from "./admin";
export type User = typeof users_temp.$inferSelect;
@@ -191,3 +191,26 @@ export const checkProjectAccess = async (
});
}
};
+
+export const findMemberById = async (
+ userId: string,
+ organizationId: string,
+) => {
+ const result = await db.query.member.findFirst({
+ where: and(
+ eq(member.userId, userId),
+ eq(member.organizationId, organizationId),
+ ),
+ with: {
+ user: true,
+ },
+ });
+
+ if (!result) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "Permission denied",
+ });
+ }
+ return result;
+};
From 5ae103e779f03a0900d0e3e9b61cb0c159f1a461 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 21 Feb 2025 00:48:04 -0600
Subject: [PATCH 52/89] refactor: update permission checks to use organization
context
---
apps/dokploy/components/layouts/side.tsx | 21 ++--
apps/dokploy/server/api/routers/project.ts | 25 ++++-
packages/server/src/services/user.ts | 111 +++++++++++++++------
3 files changed, 107 insertions(+), 50 deletions(-)
diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx
index 22f86fb08..f1296ce33 100644
--- a/apps/dokploy/components/layouts/side.tsx
+++ b/apps/dokploy/components/layouts/side.tsx
@@ -155,7 +155,7 @@ const MENU: Menu = {
// Only enabled for admins and users with access to Traefik files in non-cloud environments
isEnabled: ({ auth, isCloud }) =>
!!(
- (auth?.role === "owner" || auth?.user?.canAccessToTraefikFiles) &&
+ (auth?.role === "owner" || auth?.canAccessToTraefikFiles) &&
!isCloud
),
},
@@ -166,10 +166,7 @@ const MENU: Menu = {
icon: BlocksIcon,
// Only enabled for admins and users with access to Docker in non-cloud environments
isEnabled: ({ auth, isCloud }) =>
- !!(
- (auth?.role === "owner" || auth?.user?.canAccessToDocker) &&
- !isCloud
- ),
+ !!((auth?.role === "owner" || auth?.canAccessToDocker) && !isCloud),
},
{
isSingle: true,
@@ -178,10 +175,7 @@ const MENU: Menu = {
icon: PieChart,
// Only enabled for admins and users with access to Docker in non-cloud environments
isEnabled: ({ auth, isCloud }) =>
- !!(
- (auth?.role === "owner" || auth?.user?.canAccessToDocker) &&
- !isCloud
- ),
+ !!((auth?.role === "owner" || auth?.canAccessToDocker) && !isCloud),
},
{
isSingle: true,
@@ -190,10 +184,7 @@ const MENU: Menu = {
icon: Forward,
// Only enabled for admins and users with access to Docker in non-cloud environments
isEnabled: ({ auth, isCloud }) =>
- !!(
- (auth?.role === "owner" || auth?.user?.canAccessToDocker) &&
- !isCloud
- ),
+ !!((auth?.role === "owner" || auth?.canAccessToDocker) && !isCloud),
},
// Legacy unused menu, adjusted to the new structure
@@ -291,7 +282,7 @@ const MENU: Menu = {
url: "/dashboard/settings/ssh-keys",
// Only enabled for admins and users with access to SSH keys
isEnabled: ({ auth }) =>
- !!(auth?.role === "owner" || auth?.user?.canAccessToSSHKeys),
+ !!(auth?.role === "owner" || auth?.canAccessToSSHKeys),
},
{
isSingle: true,
@@ -300,7 +291,7 @@ const MENU: Menu = {
icon: GitBranch,
// Only enabled for admins and users with access to Git providers
isEnabled: ({ auth }) =>
- !!(auth?.role === "owner" || auth?.user?.canAccessToGitProviders),
+ !!(auth?.role === "owner" || auth?.canAccessToGitProviders),
},
{
isSingle: true,
diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts
index e3c24e538..68b068bc3 100644
--- a/apps/dokploy/server/api/routers/project.ts
+++ b/apps/dokploy/server/api/routers/project.ts
@@ -38,7 +38,11 @@ export const projectRouter = createTRPCRouter({
.mutation(async ({ ctx, input }) => {
try {
if (ctx.user.rol === "member") {
- await checkProjectAccess(ctx.user.id, "create");
+ await checkProjectAccess(
+ ctx.user.id,
+ "create",
+ ctx.session.activeOrganizationId,
+ );
}
const admin = await findUserById(ctx.user.ownerId);
@@ -55,7 +59,11 @@ export const projectRouter = createTRPCRouter({
ctx.session.activeOrganizationId,
);
if (ctx.user.rol === "member") {
- await addNewProject(ctx.user.id, project.projectId);
+ await addNewProject(
+ ctx.user.id,
+ project.projectId,
+ ctx.session.activeOrganizationId,
+ );
}
return project;
@@ -77,7 +85,12 @@ export const projectRouter = createTRPCRouter({
ctx.session.activeOrganizationId,
);
- await checkProjectAccess(ctx.user.id, "access", input.projectId);
+ await checkProjectAccess(
+ ctx.user.id,
+ "access",
+ ctx.session.activeOrganizationId,
+ input.projectId,
+ );
const project = await db.query.projects.findFirst({
where: and(
@@ -212,7 +225,11 @@ export const projectRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkProjectAccess(ctx.user.id, "delete");
+ await checkProjectAccess(
+ ctx.user.id,
+ "delete",
+ ctx.session.activeOrganizationId,
+ );
}
const currentProject = await findProjectById(input.projectId);
if (
diff --git a/packages/server/src/services/user.ts b/packages/server/src/services/user.ts
index 9351a0031..9e924e9f1 100644
--- a/packages/server/src/services/user.ts
+++ b/packages/server/src/services/user.ts
@@ -33,32 +33,48 @@ export const findUserByAuthId = async (authId: string) => {
// return userR;
};
-export const addNewProject = async (userId: string, projectId: string) => {
- const userR = await findUserById(userId);
+export const addNewProject = async (
+ userId: string,
+ projectId: string,
+ organizationId: string,
+) => {
+ const userR = await findMemberById(userId, organizationId);
- // await db
- // .update(user)
- // .set({
- // accessedProjects: [...userR.accessedProjects, projectId],
- // })
- // .where(eq(user.authId, authId));
+ await db
+ .update(member)
+ .set({
+ accessedProjects: [...userR.accessedProjects, projectId],
+ })
+ .where(
+ and(eq(member.id, userR.id), eq(member.organizationId, organizationId)),
+ );
};
-export const addNewService = async (userId: string, serviceId: string) => {
- const userR = await findUserById(userId);
- // await db
- // .update(user)
- // .set({
- // accessedServices: [...userR.accessedServices, serviceId],
- // })
- // .where(eq(user.userId, userId));
+export const addNewService = async (
+ userId: string,
+ serviceId: string,
+ organizationId: string,
+) => {
+ const userR = await findMemberById(userId, organizationId);
+ await db
+ .update(member)
+ .set({
+ accessedServices: [...userR.accessedServices, serviceId],
+ })
+ .where(
+ and(eq(member.id, userR.id), eq(member.organizationId, organizationId)),
+ );
};
export const canPerformCreationService = async (
userId: string,
projectId: string,
+ organizationId: string,
) => {
- const { accessedProjects, canCreateServices } = await findUserById(userId);
+ const { accessedProjects, canCreateServices } = await findMemberById(
+ userId,
+ organizationId,
+ );
const haveAccessToProject = accessedProjects.includes(projectId);
if (canCreateServices && haveAccessToProject) {
@@ -71,8 +87,9 @@ export const canPerformCreationService = async (
export const canPerformAccessService = async (
userId: string,
serviceId: string,
+ organizationId: string,
) => {
- const { accessedServices } = await findUserById(userId);
+ const { accessedServices } = await findMemberById(userId, organizationId);
const haveAccessToService = accessedServices.includes(serviceId);
if (haveAccessToService) {
@@ -85,8 +102,12 @@ export const canPerformAccessService = async (
export const canPeformDeleteService = async (
userId: string,
serviceId: string,
+ organizationId: string,
) => {
- const { accessedServices, canDeleteServices } = await findUserById(userId);
+ const { accessedServices, canDeleteServices } = await findMemberById(
+ userId,
+ organizationId,
+ );
const haveAccessToService = accessedServices.includes(serviceId);
if (canDeleteServices && haveAccessToService) {
@@ -96,8 +117,11 @@ export const canPeformDeleteService = async (
return false;
};
-export const canPerformCreationProject = async (userId: string) => {
- const { canCreateProjects } = await findUserById(userId);
+export const canPerformCreationProject = async (
+ userId: string,
+ organizationId: string,
+) => {
+ const { canCreateProjects } = await findMemberById(userId, organizationId);
if (canCreateProjects) {
return true;
@@ -106,8 +130,11 @@ export const canPerformCreationProject = async (userId: string) => {
return false;
};
-export const canPerformDeleteProject = async (userId: string) => {
- const { canDeleteProjects } = await findUserById(userId);
+export const canPerformDeleteProject = async (
+ userId: string,
+ organizationId: string,
+) => {
+ const { canDeleteProjects } = await findMemberById(userId, organizationId);
if (canDeleteProjects) {
return true;
@@ -119,8 +146,9 @@ export const canPerformDeleteProject = async (userId: string) => {
export const canPerformAccessProject = async (
userId: string,
projectId: string,
+ organizationId: string,
) => {
- const { accessedProjects } = await findUserById(userId);
+ const { accessedProjects } = await findMemberById(userId, organizationId);
const haveAccessToProject = accessedProjects.includes(projectId);
@@ -130,26 +158,45 @@ export const canPerformAccessProject = async (
return false;
};
-export const canAccessToTraefikFiles = async (userId: string) => {
- const { canAccessToTraefikFiles } = await findUserById(userId);
+export const canAccessToTraefikFiles = async (
+ userId: string,
+ organizationId: string,
+) => {
+ const { canAccessToTraefikFiles } = await findMemberById(
+ userId,
+ organizationId,
+ );
return canAccessToTraefikFiles;
};
export const checkServiceAccess = async (
userId: string,
serviceId: string,
+ organizationId: string,
action = "access" as "access" | "create" | "delete",
) => {
let hasPermission = false;
switch (action) {
case "create":
- hasPermission = await canPerformCreationService(userId, serviceId);
+ hasPermission = await canPerformCreationService(
+ userId,
+ serviceId,
+ organizationId,
+ );
break;
case "access":
- hasPermission = await canPerformAccessService(userId, serviceId);
+ hasPermission = await canPerformAccessService(
+ userId,
+ serviceId,
+ organizationId,
+ );
break;
case "delete":
- hasPermission = await canPeformDeleteService(userId, serviceId);
+ hasPermission = await canPeformDeleteService(
+ userId,
+ serviceId,
+ organizationId,
+ );
break;
default:
hasPermission = false;
@@ -165,6 +212,7 @@ export const checkServiceAccess = async (
export const checkProjectAccess = async (
authId: string,
action: "create" | "delete" | "access",
+ organizationId: string,
projectId?: string,
) => {
let hasPermission = false;
@@ -173,13 +221,14 @@ export const checkProjectAccess = async (
hasPermission = await canPerformAccessProject(
authId,
projectId as string,
+ organizationId,
);
break;
case "create":
- hasPermission = await canPerformCreationProject(authId);
+ hasPermission = await canPerformCreationProject(authId, organizationId);
break;
case "delete":
- hasPermission = await canPerformDeleteProject(authId);
+ hasPermission = await canPerformDeleteProject(authId, organizationId);
break;
default:
hasPermission = false;
From b02195db17ac05369cfad80311f44c98a35be7f2 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 22 Feb 2025 02:31:04 -0600
Subject: [PATCH 53/89] feat: add organization invitation system and update
user profile management
---
.../settings/profile/profile-form.tsx | 2 +-
apps/dokploy/components/layouts/side.tsx | 190 ++++++++++--------
.../dokploy/server/api/routers/application.ts | 6 +-
apps/dokploy/server/api/routers/compose.ts | 12 +-
apps/dokploy/server/api/routers/mariadb.ts | 6 +-
apps/dokploy/server/api/routers/mongo.ts | 6 +-
apps/dokploy/server/api/routers/mysql.ts | 6 +-
apps/dokploy/server/api/routers/postgres.ts | 6 +-
apps/dokploy/server/api/routers/redis.ts | 6 +-
apps/dokploy/server/api/routers/registry.ts | 2 +-
apps/dokploy/server/api/routers/user.ts | 27 ++-
11 files changed, 169 insertions(+), 100 deletions(-)
diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
index ba2009bd2..ca1bf3c21 100644
--- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
@@ -65,7 +65,7 @@ export const ProfileForm = () => {
isLoading: isUpdating,
isError,
error,
- } = api.auth.update.useMutation();
+ } = api.user.update.useMutation();
const { t } = useTranslation("settings");
const [gravatarHash, setGravatarHash] = useState
(null);
diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx
index f1296ce33..cba10ca0f 100644
--- a/apps/dokploy/components/layouts/side.tsx
+++ b/apps/dokploy/components/layouts/side.tsx
@@ -27,6 +27,8 @@ import {
Trash2,
User,
Users,
+ ChevronsUpDown,
+ Plus,
} from "lucide-react";
import { usePathname } from "next/navigation";
import type * as React from "react";
@@ -75,6 +77,20 @@ import { useRouter } from "next/router";
import { Logo } from "../shared/logo";
import { UpdateServerButton } from "./update-server";
import { UserNav } from "./user-nav";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuShortcut,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { authClient } from "@/lib/auth-client";
+import { toast } from "sonner";
+import { AddOrganization } from "../dashboard/organization/handle-organization";
+import { DialogAction } from "../shared/dialog-action";
+import { Button } from "../ui/button";
// The types of the queries we are going to use
type AuthQueryOutput = inferRouterOutputs["auth"]["get"];
@@ -473,46 +489,6 @@ interface Props {
function LogoWrapper() {
return ;
}
-import { ChevronsUpDown, Plus } from "lucide-react";
-
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { authClient } from "@/lib/auth-client";
-import { toast } from "sonner";
-import { AddOrganization } from "../dashboard/organization/handle-organization";
-import { DialogAction } from "../shared/dialog-action";
-import { Button } from "../ui/button";
-const data = {
- user: {
- name: "shadcn",
- email: "m@example.com",
- avatar: "/avatars/shadcn.jpg",
- },
- teams: [
- {
- name: "Acme Inc",
- logo: GalleryVerticalEnd,
- plan: "Enterprise",
- },
- {
- name: "Acme Corp.",
- logo: AudioWaveform,
- plan: "Startup",
- },
- {
- name: "Evil Corp.",
- logo: Command,
- plan: "Free",
- },
- ],
-};
function SidebarLogo() {
const { state } = useSidebar();
@@ -529,6 +505,10 @@ function SidebarLogo() {
api.organization.delete.useMutation();
const { isMobile } = useSidebar();
const { data: activeOrganization } = authClient.useActiveOrganization();
+ const utils = api.useUtils();
+
+ const { data: invitations, refetch: refetchInvitations } =
+ api.user.getInvitations.useQuery();
const [activeTeam, setActiveTeam] = useState<
typeof activeOrganization | null
@@ -549,31 +529,27 @@ function SidebarLogo() {
) : (
-
+
- {/* */}
-
-
-
-
-
- {activeTeam?.name}
-
+
+
+
+
+
+
+ {activeOrganization?.name}
+
+
@@ -587,14 +563,13 @@ function SidebarLogo() {
Organizations
- {organizations?.map((org, index) => (
+ {organizations?.map((org) => (
{
await authClient.organization.setActive({
organizationId: org.id,
});
-
window.location.reload();
}}
className="w-full gap-2 p-2"
@@ -655,35 +630,76 @@ function SidebarLogo() {
)}
+
+
+
+
+
+
+ Pending Invitations
+ {invitations && invitations.length > 0 ? (
+ invitations.map((invitation) => (
+
+
e.preventDefault()}
+ >
+ {invitation.email}
+
+ Expires:{" "}
+ {new Date(invitation.expiresAt).toLocaleDateString()}
+
+
+ Role: {invitation.role}
+
+
+
{
+ const { error } =
+ await authClient.organization.acceptInvitation({
+ invitationId: invitation.id,
+ });
+
+ if (error) {
+ toast.error(
+ error.message || "Error accepting invitation",
+ );
+ } else {
+ toast.success("Invitation accepted successfully");
+ await refetchInvitations();
+ }
+ }}
+ >
+
+
+
+ ))
+ ) : (
+
+ No pending invitations
+
+ )}
+
+
)}
-
- {/*
-
-
-
-
-
-
Dokploy
-
- {dokployVersion}
-
-
- */}
>
);
}
diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts
index 490da340a..269ac77b5 100644
--- a/apps/dokploy/server/api/routers/application.ts
+++ b/apps/dokploy/server/api/routers/application.ts
@@ -81,7 +81,11 @@ export const applicationRouter = createTRPCRouter({
const newApplication = await createApplication(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newApplication.applicationId);
+ await addNewService(
+ ctx.user.id,
+ newApplication.applicationId,
+ project.organizationId,
+ );
}
return newApplication;
} catch (error: unknown) {
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index d9cd46d24..258a03d4b 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -80,7 +80,11 @@ export const composeRouter = createTRPCRouter({
const newService = await createCompose(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newService.composeId);
+ await addNewService(
+ ctx.user.id,
+ newService.composeId,
+ project.organizationId,
+ );
}
return newService;
@@ -424,7 +428,11 @@ export const composeRouter = createTRPCRouter({
});
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, compose.composeId);
+ await addNewService(
+ ctx.user.id,
+ compose.composeId,
+ project.organizationId,
+ );
}
if (mounts && mounts?.length > 0) {
diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts
index 4276560c6..5735620e7 100644
--- a/apps/dokploy/server/api/routers/mariadb.ts
+++ b/apps/dokploy/server/api/routers/mariadb.ts
@@ -57,7 +57,11 @@ export const mariadbRouter = createTRPCRouter({
}
const newMariadb = await createMariadb(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newMariadb.mariadbId);
+ await addNewService(
+ ctx.user.id,
+ newMariadb.mariadbId,
+ project.organizationId,
+ );
}
await createMount({
diff --git a/apps/dokploy/server/api/routers/mongo.ts b/apps/dokploy/server/api/routers/mongo.ts
index d1d12bd0b..7f8716a59 100644
--- a/apps/dokploy/server/api/routers/mongo.ts
+++ b/apps/dokploy/server/api/routers/mongo.ts
@@ -56,7 +56,11 @@ export const mongoRouter = createTRPCRouter({
}
const newMongo = await createMongo(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newMongo.mongoId);
+ await addNewService(
+ ctx.user.id,
+ newMongo.mongoId,
+ project.organizationId,
+ );
}
await createMount({
diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts
index dc107bdba..96ea4846f 100644
--- a/apps/dokploy/server/api/routers/mysql.ts
+++ b/apps/dokploy/server/api/routers/mysql.ts
@@ -59,7 +59,11 @@ export const mysqlRouter = createTRPCRouter({
const newMysql = await createMysql(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newMysql.mysqlId);
+ await addNewService(
+ ctx.user.id,
+ newMysql.mysqlId,
+ project.organizationId,
+ );
}
await createMount({
diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts
index b74bc0f68..aa3a0459d 100644
--- a/apps/dokploy/server/api/routers/postgres.ts
+++ b/apps/dokploy/server/api/routers/postgres.ts
@@ -64,7 +64,11 @@ export const postgresRouter = createTRPCRouter({
}
const newPostgres = await createPostgres(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newPostgres.postgresId);
+ await addNewService(
+ ctx.user.id,
+ newPostgres.postgresId,
+ project.organizationId,
+ );
}
await createMount({
diff --git a/apps/dokploy/server/api/routers/redis.ts b/apps/dokploy/server/api/routers/redis.ts
index db76ee6ce..6d5a84d5e 100644
--- a/apps/dokploy/server/api/routers/redis.ts
+++ b/apps/dokploy/server/api/routers/redis.ts
@@ -56,7 +56,11 @@ export const redisRouter = createTRPCRouter({
}
const newRedis = await createRedis(input);
if (ctx.user.rol === "member") {
- await addNewService(ctx.user.id, newRedis.redisId);
+ await addNewService(
+ ctx.user.id,
+ newRedis.redisId,
+ project.organizationId,
+ );
}
await createMount({
diff --git a/apps/dokploy/server/api/routers/registry.ts b/apps/dokploy/server/api/routers/registry.ts
index 6ad7e2a94..62c8a9b65 100644
--- a/apps/dokploy/server/api/routers/registry.ts
+++ b/apps/dokploy/server/api/routers/registry.ts
@@ -18,7 +18,7 @@ import {
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
-
+import { db } from "@/server/db";
export const registryRouter = createTRPCRouter({
create: adminProcedure
.input(apiCreateRegistry)
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index 6b4e8eded..872ee0744 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -15,10 +15,11 @@ import {
apiAssignPermissions,
apiFindOneToken,
apiUpdateUser,
+ invitation,
member,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { and, asc, desc, eq } from "drizzle-orm";
+import { and, asc, desc, eq, gt } from "drizzle-orm";
import { z } from "zod";
import {
adminProcedure,
@@ -115,14 +116,34 @@ export const userRouter = createTRPCRouter({
});
}
+ const { id, ...rest } = input;
+
+ console.log(rest);
await db
.update(member)
.set({
- ...input,
+ ...rest,
})
- .where(eq(member.userId, input.id));
+ .where(
+ and(
+ eq(member.userId, input.id),
+ eq(
+ member.organizationId,
+ ctx.session?.activeOrganizationId || "",
+ ),
+ ),
+ );
} catch (error) {
throw error;
}
}),
+ getInvitations: protectedProcedure.query(async ({ ctx }) => {
+ return await db.query.invitation.findMany({
+ where: and(
+ eq(invitation.email, ctx.user.email),
+ gt(invitation.expiresAt, new Date()),
+ eq(invitation.status, "pending"),
+ ),
+ });
+ }),
});
From c52725420ef81cf066c006a4a59e6c6b5f6d0e61 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 22 Feb 2025 02:35:44 -0600
Subject: [PATCH 54/89] refactor: use organization context for server creation
---
apps/dokploy/server/api/routers/server.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apps/dokploy/server/api/routers/server.ts b/apps/dokploy/server/api/routers/server.ts
index 3662345d4..1d7fd40e8 100644
--- a/apps/dokploy/server/api/routers/server.ts
+++ b/apps/dokploy/server/api/routers/server.ts
@@ -50,7 +50,10 @@ export const serverRouter = createTRPCRouter({
message: "You cannot create more servers",
});
}
- const project = await createServer(input, ctx.user.ownerId);
+ const project = await createServer(
+ input,
+ ctx.session.activeOrganizationId,
+ );
return project;
} catch (error) {
throw new TRPCError({
From 81a881b07e1548fd5e2062834c7e607a4d10a1cf Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 22 Feb 2025 13:53:57 -0600
Subject: [PATCH 55/89] feat: enhance organization invitation UI and add
organization details
---
apps/dokploy/components/layouts/side.tsx | 103 ++++++++++++-----------
apps/dokploy/server/api/routers/user.ts | 3 +
packages/server/src/db/schema/user.ts | 7 +-
3 files changed, 63 insertions(+), 50 deletions(-)
diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx
index cba10ca0f..e0931b08f 100644
--- a/apps/dokploy/components/layouts/side.tsx
+++ b/apps/dokploy/components/layouts/side.tsx
@@ -555,7 +555,7 @@ function SidebarLogo() {
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index 872ee0744..5c4eb56d5 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -144,6 +144,9 @@ export const userRouter = createTRPCRouter({
gt(invitation.expiresAt, new Date()),
eq(invitation.status, "pending"),
),
+ with: {
+ organization: true,
+ },
});
}),
});
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index 5860875f6..67a247414 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -140,7 +140,12 @@ export const apiRemoveUser = createSchema
})
.required();
-export const apiFindOneToken = createSchema.pick({}).required();
+export const apiFindOneToken = createSchema
+ .pick({})
+ .required()
+ .extend({
+ token: z.string().min(1),
+ });
export const apiAssignPermissions = createSchema
.pick({
From 1a415b96c90b428a903a6516de1cc94cbe04ec11 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 22 Feb 2025 18:03:12 -0600
Subject: [PATCH 56/89] refactor: remove unused auth service and clean up
server-side code
---
apps/api/src/index.ts | 2 +-
apps/api/src/utils.ts | 2 +-
.../__test__/compose/config/config.test.ts | 2 +-
.../compose/network/network-root.test.ts | 23 --
.../compose/secrets/secret-root.test.ts | 2 +-
.../__test__/compose/volume/volume.test.ts | 6 +-
.../server/update-server-config.test.ts | 2 -
apps/dokploy/components/auth/login-2fa.tsx | 1 -
.../cluster/show-cluster-settings.tsx | 1 -
.../advanced/general/add-command.tsx | 1 -
.../application/advanced/ports/show-port.tsx | 1 -
.../advanced/redirects/show-redirects.tsx | 1 -
.../advanced/security/show-security.tsx | 1 -
.../application/advanced/show-resources.tsx | 2 +-
.../advanced/traefik/show-traefik-config.tsx | 1 -
.../advanced/volumes/show-volumes.tsx | 1 -
.../advanced/volumes/update-volume.tsx | 2 +-
.../application/deployments/refresh-token.tsx | 1 -
.../environment/show-enviroment.tsx | 2 +-
.../application/environment/show.tsx | 2 +-
.../application/general/generic/show.tsx | 2 +-
.../dashboard/application/general/show.tsx | 1 -
.../show-preview-builds.tsx | 1 -
.../show-preview-deployments.tsx | 1 -
.../application/update-application.tsx | 2 +-
.../compose/advanced/add-command.tsx | 1 -
.../deployments/refresh-token-compose.tsx | 1 -
.../compose/general/generic/show.tsx | 2 +-
.../compose/general/randomize-compose.tsx | 2 +-
.../dashboard/compose/general/show.tsx | 1 -
.../dashboard/compose/logs/show.tsx | 2 +-
.../database/backups/show-backups.tsx | 1 -
.../database/backups/update-backup.tsx | 2 +-
.../docker/logs/since-logs-filter.tsx | 1 -
.../dashboard/docker/logs/terminal-line.tsx | 1 -
.../dashboard/docker/show/colums.tsx | 1 -
.../dashboard/docker/show/show-containers.tsx | 28 +--
.../file-system/show-traefik-system.tsx | 3 +-
.../show-external-mariadb-credentials.tsx | 2 +-
.../mariadb/general/show-general-mariadb.tsx | 2 +-
.../show-internal-mariadb-credentials.tsx | 1 -
.../dashboard/mariadb/update-mariadb.tsx | 2 +-
.../show-external-mongo-credentials.tsx | 2 +-
.../mongo/general/show-general-mongo.tsx | 2 +-
.../show-internal-mongo-credentials.tsx | 1 -
.../show-free-compose-monitoring.tsx | 1 -
.../show-free-container-monitoring.tsx | 10 +-
.../paid/servers/show-paid-monitoring.tsx | 1 -
.../show-external-mysql-credentials.tsx | 2 +-
.../mysql/general/show-general-mysql.tsx | 2 +-
.../show-internal-mysql-credentials.tsx | 1 -
.../dashboard/mysql/update-mysql.tsx | 2 +-
.../organization/handle-organization.tsx | 2 +-
.../postgres/advanced/show-custom-command.tsx | 2 +-
.../show-external-postgres-credentials.tsx | 2 +-
.../general/show-general-postgres.tsx | 2 +-
.../show-internal-postgres-credentials.tsx | 1 -
.../dashboard/postgres/update-postgres.tsx | 2 +-
.../dashboard/project/add-database.tsx | 1 -
.../dashboard/project/add-template.tsx | 1 -
.../dashboard/projects/handle-project.tsx | 1 -
.../show-external-redis-credentials.tsx | 2 +-
.../redis/general/show-general-redis.tsx | 2 +-
.../show-internal-redis-credentials.tsx | 1 -
.../dashboard/redis/update-redis.tsx | 2 +-
.../components/dashboard/requests/columns.tsx | 1 -
.../dashboard/requests/show-requests.tsx | 1 -
.../components/dashboard/search-command.tsx | 2 -
.../settings/billing/show-billing.tsx | 2 +-
.../settings/billing/show-welcome-dokploy.tsx | 1 -
.../settings/cluster/nodes/show-nodes.tsx | 1 -
.../git/bitbucket/add-bitbucket-provider.tsx | 6 +-
.../git/bitbucket/edit-bitbucket-provider.tsx | 2 +-
.../git/gitlab/edit-gitlab-provider.tsx | 2 +-
.../dashboard/settings/profile/enable-2fa.tsx | 1 -
.../settings/profile/profile-form.tsx | 2 -
.../servers/actions/show-dokploy-actions.tsx | 1 -
.../servers/actions/show-storage-actions.tsx | 1 -
.../servers/actions/show-traefik-actions.tsx | 14 +-
.../settings/servers/gpu-support.tsx | 1 -
.../settings/servers/setup-monitoring.tsx | 2 -
.../servers/show-docker-containers-modal.tsx | 8 +-
.../servers/show-swarm-overview-modal.tsx | 9 +-
.../dashboard/settings/users/show-users.tsx | 83 ++++---
.../dashboard/settings/web-domain.tsx | 2 +-
.../dashboard/settings/web-server.tsx | 2 -
.../web-server/local-server-config.tsx | 1 -
.../settings/web-server/show-modal-logs.tsx | 1 -
.../settings/web-server/update-server.tsx | 2 -
.../dashboard/swarm/applications/columns.tsx | 1 -
.../swarm/applications/show-applications.tsx | 1 -
.../components/icons/data-tools-icons.tsx | 1 -
apps/dokploy/components/layouts/side.tsx | 30 +--
apps/dokploy/components/layouts/user-nav.tsx | 2 -
.../components/shared/dialog-action.tsx | 1 -
.../dokploy/components/shared/drawer-logs.tsx | 9 +-
apps/dokploy/components/shared/logo.tsx | 2 -
apps/dokploy/components/ui/modeToggle.tsx | 1 -
apps/dokploy/migrate.ts | 1 -
apps/dokploy/pages/api/deploy/github.ts | 2 -
.../pages/api/providers/github/setup.ts | 9 +-
apps/dokploy/pages/api/stripe/webhook.ts | 2 +-
apps/dokploy/pages/dashboard/docker.tsx | 2 +-
apps/dokploy/pages/dashboard/monitoring.tsx | 4 -
.../services/application/[applicationId].tsx | 5 +-
.../services/compose/[composeId].tsx | 3 +-
.../services/mariadb/[mariadbId].tsx | 6 +-
.../[projectId]/services/mongo/[mongoId].tsx | 6 +-
.../[projectId]/services/mysql/[mysqlId].tsx | 6 +-
.../services/postgres/[postgresId].tsx | 6 +-
.../[projectId]/services/redis/[redisId].tsx | 4 +-
apps/dokploy/pages/dashboard/projects.tsx | 1 -
apps/dokploy/pages/dashboard/requests.tsx | 1 -
.../pages/dashboard/settings/billing.tsx | 2 +-
.../pages/dashboard/settings/certificates.tsx | 2 +-
.../pages/dashboard/settings/cluster.tsx | 2 +-
.../pages/dashboard/settings/destinations.tsx | 2 +-
.../dashboard/settings/git-providers.tsx | 2 +-
.../pages/dashboard/settings/index.tsx | 3 +-
.../dashboard/settings/notifications.tsx | 2 +-
.../pages/dashboard/settings/profile.tsx | 2 +-
.../pages/dashboard/settings/registry.tsx | 2 +-
.../pages/dashboard/settings/server.tsx | 5 +-
.../pages/dashboard/settings/servers.tsx | 2 +-
.../pages/dashboard/settings/ssh-keys.tsx | 2 +-
.../pages/dashboard/settings/users.tsx | 2 +-
apps/dokploy/pages/dashboard/traefik.tsx | 2 +-
apps/dokploy/pages/index.tsx | 14 +-
apps/dokploy/pages/invitation.tsx | 9 +-
apps/dokploy/pages/register.tsx | 8 +-
apps/dokploy/pages/send-reset-password.tsx | 7 +-
apps/dokploy/server/api/routers/admin.ts | 234 +-----------------
.../dokploy/server/api/routers/application.ts | 25 +-
apps/dokploy/server/api/routers/auth.ts | 39 ---
apps/dokploy/server/api/routers/backup.ts | 33 +--
apps/dokploy/server/api/routers/cluster.ts | 4 +-
apps/dokploy/server/api/routers/compose.ts | 32 ++-
.../server/api/routers/git-provider.ts | 6 +-
apps/dokploy/server/api/routers/mariadb.ts | 24 +-
apps/dokploy/server/api/routers/mongo.ts | 23 +-
apps/dokploy/server/api/routers/mysql.ts | 23 +-
.../server/api/routers/notification.ts | 6 +-
.../server/api/routers/organization.ts | 10 +-
apps/dokploy/server/api/routers/port.ts | 8 +-
apps/dokploy/server/api/routers/postgres.ts | 31 ++-
apps/dokploy/server/api/routers/project.ts | 11 +-
apps/dokploy/server/api/routers/redis.ts | 23 +-
apps/dokploy/server/api/routers/registry.ts | 2 +-
apps/dokploy/server/api/routers/server.ts | 4 +-
apps/dokploy/server/api/routers/settings.ts | 22 +-
apps/dokploy/server/api/routers/ssh-key.ts | 1 -
apps/dokploy/server/api/routers/stripe.ts | 50 ++--
apps/dokploy/server/api/routers/user.ts | 10 +-
apps/dokploy/server/db/seed.ts | 1 -
apps/dokploy/server/utils/backup.ts | 1 -
apps/dokploy/templates/excalidraw/index.ts | 1 -
apps/dokploy/templates/ghost/index.ts | 1 -
apps/dokploy/templates/penpot/index.ts | 2 -
apps/dokploy/templates/photoprism/index.ts | 1 -
apps/dokploy/templates/triggerdotdev/index.ts | 1 -
apps/dokploy/templates/unsend/index.ts | 1 -
biome.json | 5 +-
packages/server/auth-schema.ts | 8 +-
packages/server/src/db/schema/user.ts | 2 +-
.../server/src/emails/emails/build-failed.tsx | 1 -
.../src/emails/emails/build-success.tsx | 1 -
.../src/emails/emails/database-backup.tsx | 1 -
.../src/emails/emails/docker-cleanup.tsx | 2 -
.../src/emails/emails/dokploy-restart.tsx | 1 -
.../src/emails/emails/notion-magic-link.tsx | 1 -
.../emails/emails/plaid-verify-identity.tsx | 1 -
.../src/emails/emails/stripe-welcome.tsx | 1 -
.../src/emails/emails/vercel-invite-user.tsx | 1 -
packages/server/src/index.ts | 2 -
packages/server/src/lib/auth.ts | 1 -
packages/server/src/services/admin.ts | 3 -
packages/server/src/services/application.ts | 5 +-
packages/server/src/services/auth.ts | 212 ----------------
packages/server/src/services/backup.ts | 2 -
packages/server/src/services/compose.ts | 3 +-
packages/server/src/services/deployment.ts | 10 +-
packages/server/src/services/domain.ts | 2 +-
packages/server/src/services/gitlab.ts | 2 -
packages/server/src/services/mariadb.ts | 2 +-
packages/server/src/services/mongo.ts | 2 +-
packages/server/src/services/mount.ts | 4 +-
packages/server/src/services/postgres.ts | 2 +-
.../server/src/services/preview-deployment.ts | 16 +-
packages/server/src/services/redirect.ts | 6 +-
packages/server/src/services/redis.ts | 2 +-
packages/server/src/services/registry.ts | 4 +-
packages/server/src/services/security.ts | 8 +-
packages/server/src/services/server.ts | 2 +-
packages/server/src/services/settings.ts | 1 -
packages/server/src/services/user.ts | 30 +--
packages/server/src/setup/monitoring-setup.ts | 2 +-
.../server/src/utils/access-log/handler.ts | 1 -
packages/server/src/utils/backups/mysql.ts | 1 -
packages/server/src/utils/builders/compose.ts | 1 -
.../utils/notifications/database-backup.ts | 1 -
.../server/src/utils/traefik/middleware.ts | 2 +-
201 files changed, 434 insertions(+), 1035 deletions(-)
delete mode 100644 packages/server/src/services/auth.ts
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index 4b405e9c7..0db565995 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -28,7 +28,7 @@ app.use(async (c, next) => {
app.post("/deploy", zValidator("json", deployJobSchema), (c) => {
const data = c.req.valid("json");
- const res = queue.add(data, { groupName: data.serverId });
+ queue.add(data, { groupName: data.serverId });
return c.json(
{
message: "Deployment Added",
diff --git a/apps/api/src/utils.ts b/apps/api/src/utils.ts
index d919f29e9..3f3c9698b 100644
--- a/apps/api/src/utils.ts
+++ b/apps/api/src/utils.ts
@@ -64,7 +64,7 @@ export const deploy = async (job: DeployJob) => {
}
}
}
- } catch (error) {
+ } catch (_) {
if (job.applicationType === "application") {
await updateApplicationStatus(job.applicationId, "error");
} else if (job.applicationType === "compose") {
diff --git a/apps/dokploy/__test__/compose/config/config.test.ts b/apps/dokploy/__test__/compose/config/config.test.ts
index 3f98525a2..aed3350f5 100644
--- a/apps/dokploy/__test__/compose/config/config.test.ts
+++ b/apps/dokploy/__test__/compose/config/config.test.ts
@@ -1,5 +1,5 @@
import { generateRandomHash } from "@dokploy/server";
-import { addSuffixToAllConfigs, addSuffixToConfigsRoot } from "@dokploy/server";
+import { addSuffixToAllConfigs } from "@dokploy/server";
import type { ComposeSpecification } from "@dokploy/server";
import { load } from "js-yaml";
import { expect, test } from "vitest";
diff --git a/apps/dokploy/__test__/compose/network/network-root.test.ts b/apps/dokploy/__test__/compose/network/network-root.test.ts
index 7e06a9f0b..980502fff 100644
--- a/apps/dokploy/__test__/compose/network/network-root.test.ts
+++ b/apps/dokploy/__test__/compose/network/network-root.test.ts
@@ -293,29 +293,6 @@ networks:
dokploy-network:
`;
-const expectedComposeFile7 = `
-version: "3.8"
-
-services:
- web:
- image: nginx:latest
- networks:
- - dokploy-network
-
-networks:
- dokploy-network:
- driver: bridge
- driver_opts:
- com.docker.network.driver.mtu: 1200
-
- backend:
- driver: bridge
- attachable: true
-
- external_network:
- external: true
- name: dokploy-network
-`;
test("It shoudn't add suffix to dokploy-network", () => {
const composeData = load(composeFile7) as ComposeSpecification;
diff --git a/apps/dokploy/__test__/compose/secrets/secret-root.test.ts b/apps/dokploy/__test__/compose/secrets/secret-root.test.ts
index 2bd91b58a..1b1898c59 100644
--- a/apps/dokploy/__test__/compose/secrets/secret-root.test.ts
+++ b/apps/dokploy/__test__/compose/secrets/secret-root.test.ts
@@ -1,7 +1,7 @@
import { generateRandomHash } from "@dokploy/server";
import { addSuffixToSecretsRoot } from "@dokploy/server";
import type { ComposeSpecification } from "@dokploy/server";
-import { dump, load } from "js-yaml";
+import { load } from "js-yaml";
import { expect, test } from "vitest";
test("Generate random hash with 8 characters", () => {
diff --git a/apps/dokploy/__test__/compose/volume/volume.test.ts b/apps/dokploy/__test__/compose/volume/volume.test.ts
index d4623aeb1..6c4344762 100644
--- a/apps/dokploy/__test__/compose/volume/volume.test.ts
+++ b/apps/dokploy/__test__/compose/volume/volume.test.ts
@@ -1,8 +1,4 @@
-import { generateRandomHash } from "@dokploy/server";
-import {
- addSuffixToAllVolumes,
- addSuffixToVolumesInServices,
-} from "@dokploy/server";
+import { addSuffixToAllVolumes } from "@dokploy/server";
import type { ComposeSpecification } from "@dokploy/server";
import { load } from "js-yaml";
import { expect, test } from "vitest";
diff --git a/apps/dokploy/__test__/traefik/server/update-server-config.test.ts b/apps/dokploy/__test__/traefik/server/update-server-config.test.ts
index 49d71bc4c..7e4a3c82a 100644
--- a/apps/dokploy/__test__/traefik/server/update-server-config.test.ts
+++ b/apps/dokploy/__test__/traefik/server/update-server-config.test.ts
@@ -126,8 +126,6 @@ test("Should not touch config without host", () => {
});
test("Should remove websecure if https rollback to http", () => {
- const originalConfig: FileConfig = loadOrCreateConfig("dokploy");
-
updateServerTraefik(
{ ...baseAdmin, certificateType: "letsencrypt" },
"example.com",
diff --git a/apps/dokploy/components/auth/login-2fa.tsx b/apps/dokploy/components/auth/login-2fa.tsx
index 6a11268e0..634f28146 100644
--- a/apps/dokploy/components/auth/login-2fa.tsx
+++ b/apps/dokploy/components/auth/login-2fa.tsx
@@ -13,7 +13,6 @@ import { CardTitle } from "@/components/ui/card";
import {
InputOTP,
InputOTPGroup,
- InputOTPSeparator,
InputOTPSlot,
} from "@/components/ui/input-otp";
import { api } from "@/utils/api";
diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
index cf7314cf6..1eadf8bab 100644
--- a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
@@ -29,7 +29,6 @@ import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { Server } from "lucide-react";
import Link from "next/link";
-import React from "react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
index 4cd839a11..50e36ad76 100644
--- a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
@@ -17,7 +17,6 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React from "react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/application/advanced/ports/show-port.tsx b/apps/dokploy/components/dashboard/application/advanced/ports/show-port.tsx
index a2c6ddcf1..4cd29a36d 100644
--- a/apps/dokploy/components/dashboard/application/advanced/ports/show-port.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/ports/show-port.tsx
@@ -10,7 +10,6 @@ import {
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { Rss, Trash2 } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import { HandlePorts } from "./handle-ports";
interface Props {
diff --git a/apps/dokploy/components/dashboard/application/advanced/redirects/show-redirects.tsx b/apps/dokploy/components/dashboard/application/advanced/redirects/show-redirects.tsx
index 4ee597917..5c2c5943c 100644
--- a/apps/dokploy/components/dashboard/application/advanced/redirects/show-redirects.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/redirects/show-redirects.tsx
@@ -9,7 +9,6 @@ import {
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { Split, Trash2 } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import { HandleRedirect } from "./handle-redirect";
diff --git a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx
index 33022c097..92439f511 100644
--- a/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/security/show-security.tsx
@@ -9,7 +9,6 @@ import {
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { LockKeyhole, Trash2 } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import { HandleSecurity } from "./handle-security";
diff --git a/apps/dokploy/components/dashboard/application/advanced/show-resources.tsx b/apps/dokploy/components/dashboard/application/advanced/show-resources.tsx
index 227bca559..3d26716fc 100644
--- a/apps/dokploy/components/dashboard/application/advanced/show-resources.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/show-resources.tsx
@@ -25,7 +25,7 @@ import {
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { InfoIcon } from "lucide-react";
-import React, { useEffect } from "react";
+import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/application/advanced/traefik/show-traefik-config.tsx b/apps/dokploy/components/dashboard/application/advanced/traefik/show-traefik-config.tsx
index fb6fc0c15..58601fb49 100644
--- a/apps/dokploy/components/dashboard/application/advanced/traefik/show-traefik-config.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/traefik/show-traefik-config.tsx
@@ -8,7 +8,6 @@ import {
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { File, Loader2 } from "lucide-react";
-import React from "react";
import { UpdateTraefikConfig } from "./update-traefik-config";
interface Props {
applicationId: string;
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx
index e0f842ce3..2a2d2c032 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/show-volumes.tsx
@@ -10,7 +10,6 @@ import {
} from "@/components/ui/card";
import { api } from "@/utils/api";
import { Package, Trash2 } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import type { ServiceType } from "../show-resources";
import { AddVolumes } from "./add-volumes";
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
index d8481d652..687d0f608 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
@@ -21,7 +21,7 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { PenBoxIcon, Pencil } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx b/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
index c268e6d51..b80450f9f 100644
--- a/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
+++ b/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
@@ -11,7 +11,6 @@ import {
} from "@/components/ui/alert-dialog";
import { api } from "@/utils/api";
import { RefreshCcw } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
interface Props {
diff --git a/apps/dokploy/components/dashboard/application/environment/show-enviroment.tsx b/apps/dokploy/components/dashboard/application/environment/show-enviroment.tsx
index b65a18161..ba20db315 100644
--- a/apps/dokploy/components/dashboard/application/environment/show-enviroment.tsx
+++ b/apps/dokploy/components/dashboard/application/environment/show-enviroment.tsx
@@ -18,7 +18,7 @@ import { Toggle } from "@/components/ui/toggle";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { EyeIcon, EyeOffIcon } from "lucide-react";
-import React, { type CSSProperties, useEffect, useState } from "react";
+import { type CSSProperties, useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/application/environment/show.tsx b/apps/dokploy/components/dashboard/application/environment/show.tsx
index 7200f2a71..d97c39e2f 100644
--- a/apps/dokploy/components/dashboard/application/environment/show.tsx
+++ b/apps/dokploy/components/dashboard/application/environment/show.tsx
@@ -1,5 +1,5 @@
import { Button } from "@/components/ui/button";
-import { Card, CardContent } from "@/components/ui/card";
+import { Card } from "@/components/ui/card";
import { Form } from "@/components/ui/form";
import { Secrets } from "@/components/ui/secrets";
import { api } from "@/utils/api";
diff --git a/apps/dokploy/components/dashboard/application/general/generic/show.tsx b/apps/dokploy/components/dashboard/application/general/generic/show.tsx
index 73f5e8f8f..b00a34953 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/show.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/show.tsx
@@ -11,7 +11,7 @@ import {
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { api } from "@/utils/api";
-import { GitBranch, LockIcon, UploadCloud } from "lucide-react";
+import { GitBranch, UploadCloud } from "lucide-react";
import Link from "next/link";
import { useState } from "react";
import { SaveBitbucketProvider } from "./save-bitbucket-provider";
diff --git a/apps/dokploy/components/dashboard/application/general/show.tsx b/apps/dokploy/components/dashboard/application/general/show.tsx
index 83e4b6f06..0ea331e94 100644
--- a/apps/dokploy/components/dashboard/application/general/show.tsx
+++ b/apps/dokploy/components/dashboard/application/general/show.tsx
@@ -7,7 +7,6 @@ import { Switch } from "@/components/ui/switch";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, Hammer, RefreshCcw, Terminal } from "lucide-react";
import { useRouter } from "next/router";
-import React from "react";
import { toast } from "sonner";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
interface Props {
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-builds.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-builds.tsx
index 55b31f3f0..90800f757 100644
--- a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-builds.tsx
+++ b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-builds.tsx
@@ -5,7 +5,6 @@ import {
Dialog,
DialogContent,
DialogDescription,
- DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-deployments.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-deployments.tsx
index 371276bdd..ec3680f10 100644
--- a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-deployments.tsx
+++ b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-deployments.tsx
@@ -22,7 +22,6 @@ import {
RocketIcon,
Trash2,
} from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import { ShowModalLogs } from "../../settings/web-server/show-modal-logs";
import { AddPreviewDomain } from "./add-preview-domain";
diff --git a/apps/dokploy/components/dashboard/application/update-application.tsx b/apps/dokploy/components/dashboard/application/update-application.tsx
index a49fc5383..90b63f08e 100644
--- a/apps/dokploy/components/dashboard/application/update-application.tsx
+++ b/apps/dokploy/components/dashboard/application/update-application.tsx
@@ -21,7 +21,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, PenBoxIcon, SquarePen } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx b/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
index 1bbd38205..c5a34b3c1 100644
--- a/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
+++ b/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
@@ -19,7 +19,6 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React from "react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx b/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
index 95fafaab1..b062b0994 100644
--- a/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
@@ -11,7 +11,6 @@ import {
} from "@/components/ui/alert-dialog";
import { api } from "@/utils/api";
import { RefreshCcw } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
interface Props {
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
index 1681039cc..347c134e3 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
@@ -7,7 +7,7 @@ import {
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { api } from "@/utils/api";
-import { CodeIcon, GitBranch, LockIcon } from "lucide-react";
+import { CodeIcon, GitBranch } from "lucide-react";
import Link from "next/link";
import { useState } from "react";
import { ComposeFileEditor } from "../compose-file-editor";
diff --git a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
index b1a00985f..4462ef0eb 100644
--- a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Switch } from "@/components/ui/switch";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, Dices } from "lucide-react";
+import { AlertTriangle } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/compose/general/show.tsx b/apps/dokploy/components/dashboard/compose/general/show.tsx
index d002b409c..71752525c 100644
--- a/apps/dokploy/components/dashboard/compose/general/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/show.tsx
@@ -7,7 +7,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { api } from "@/utils/api";
-import React from "react";
import { ComposeActions } from "./actions";
import { ShowProviderFormCompose } from "./generic/show";
interface Props {
diff --git a/apps/dokploy/components/dashboard/compose/logs/show.tsx b/apps/dokploy/components/dashboard/compose/logs/show.tsx
index 4530e0ddd..571190549 100644
--- a/apps/dokploy/components/dashboard/compose/logs/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/logs/show.tsx
@@ -18,7 +18,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { api } from "@/utils/api";
-import { Loader, Loader2 } from "lucide-react";
+import { Loader2 } from "lucide-react";
import dynamic from "next/dynamic";
import { useEffect, useState } from "react";
export const DockerLogs = dynamic(
diff --git a/apps/dokploy/components/dashboard/database/backups/show-backups.tsx b/apps/dokploy/components/dashboard/database/backups/show-backups.tsx
index 21fe28d4a..6619ceae7 100644
--- a/apps/dokploy/components/dashboard/database/backups/show-backups.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/show-backups.tsx
@@ -16,7 +16,6 @@ import {
import { api } from "@/utils/api";
import { DatabaseBackup, Play, Trash2 } from "lucide-react";
import Link from "next/link";
-import React from "react";
import { toast } from "sonner";
import type { ServiceType } from "../../application/advanced/show-resources";
import { AddBackup } from "./add-backup";
diff --git a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
index 0083bb1df..99f7692a9 100644
--- a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
@@ -35,7 +35,7 @@ import { Switch } from "@/components/ui/switch";
import { cn } from "@/lib/utils";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { CheckIcon, ChevronsUpDown, PenBoxIcon, Pencil } from "lucide-react";
+import { CheckIcon, ChevronsUpDown, PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/docker/logs/since-logs-filter.tsx b/apps/dokploy/components/dashboard/docker/logs/since-logs-filter.tsx
index b7caafe71..44f2cdfc3 100644
--- a/apps/dokploy/components/dashboard/docker/logs/since-logs-filter.tsx
+++ b/apps/dokploy/components/dashboard/docker/logs/since-logs-filter.tsx
@@ -15,7 +15,6 @@ import { Separator } from "@/components/ui/separator";
import { Switch } from "@/components/ui/switch";
import { cn } from "@/lib/utils";
import { CheckIcon } from "lucide-react";
-import React from "react";
export type TimeFilter = "all" | "1h" | "6h" | "24h" | "168h" | "720h";
diff --git a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
index c25acc67f..ee674e0fe 100644
--- a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
+++ b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
@@ -9,7 +9,6 @@ import {
import { cn } from "@/lib/utils";
import { FancyAnsi } from "fancy-ansi";
import { escapeRegExp } from "lodash";
-import React from "react";
import { type LogLine, getLogType } from "./utils";
interface LogLineProps {
diff --git a/apps/dokploy/components/dashboard/docker/show/colums.tsx b/apps/dokploy/components/dashboard/docker/show/colums.tsx
index 3feae176a..1cf0200f2 100644
--- a/apps/dokploy/components/dashboard/docker/show/colums.tsx
+++ b/apps/dokploy/components/dashboard/docker/show/colums.tsx
@@ -1,6 +1,5 @@
import type { ColumnDef } from "@tanstack/react-table";
import { ArrowUpDown, MoreHorizontal } from "lucide-react";
-import * as React from "react";
import { Button } from "@/components/ui/button";
import {
diff --git a/apps/dokploy/components/dashboard/docker/show/show-containers.tsx b/apps/dokploy/components/dashboard/docker/show/show-containers.tsx
index c66c9b9ba..024b00618 100644
--- a/apps/dokploy/components/dashboard/docker/show/show-containers.tsx
+++ b/apps/dokploy/components/dashboard/docker/show/show-containers.tsx
@@ -1,18 +1,3 @@
-import {
- type ColumnFiltersState,
- type SortingState,
- type VisibilityState,
- flexRender,
- getCoreRowModel,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable,
-} from "@tanstack/react-table";
-import { ChevronDown, Container } from "lucide-react";
-import * as React from "react";
-
-import { AlertBlock } from "@/components/shared/alert-block";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -37,6 +22,19 @@ import {
TableRow,
} from "@/components/ui/table";
import { type RouterOutputs, api } from "@/utils/api";
+import {
+ type ColumnFiltersState,
+ type SortingState,
+ type VisibilityState,
+ flexRender,
+ getCoreRowModel,
+ getFilteredRowModel,
+ getPaginationRowModel,
+ getSortedRowModel,
+ useReactTable,
+} from "@tanstack/react-table";
+import { ChevronDown, Container } from "lucide-react";
+import * as React from "react";
import { columns } from "./colums";
export type Container = NonNullable<
RouterOutputs["docker"]["getContainers"]
diff --git a/apps/dokploy/components/dashboard/file-system/show-traefik-system.tsx b/apps/dokploy/components/dashboard/file-system/show-traefik-system.tsx
index ed2ed1974..c9272f293 100644
--- a/apps/dokploy/components/dashboard/file-system/show-traefik-system.tsx
+++ b/apps/dokploy/components/dashboard/file-system/show-traefik-system.tsx
@@ -7,9 +7,8 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Tree } from "@/components/ui/file-tree";
-import { cn } from "@/lib/utils";
import { api } from "@/utils/api";
-import { FileIcon, Folder, Link, Loader2, Workflow } from "lucide-react";
+import { FileIcon, Folder, Loader2, Workflow } from "lucide-react";
import React from "react";
import { ShowTraefikFile } from "./show-traefik-file";
diff --git a/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx b/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
index f20449178..4a5c43a26 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/mariadb/general/show-general-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/general/show-general-mariadb.tsx
index 98773685f..ad6b1164b 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/show-general-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/show-general-mariadb.tsx
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
diff --git a/apps/dokploy/components/dashboard/mariadb/general/show-internal-mariadb-credentials.tsx b/apps/dokploy/components/dashboard/mariadb/general/show-internal-mariadb-credentials.tsx
index b409ac4d8..170269269 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/show-internal-mariadb-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/show-internal-mariadb-credentials.tsx
@@ -3,7 +3,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import React from "react";
interface Props {
mariadbId: string;
diff --git a/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
index 4c9be0903..48d944898 100644
--- a/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
@@ -21,7 +21,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, PenBoxIcon, SquarePen } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx b/apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx
index 6dd2e9198..9fe6e7137 100644
--- a/apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/mongo/general/show-general-mongo.tsx b/apps/dokploy/components/dashboard/mongo/general/show-general-mongo.tsx
index df01e36d4..a20d46378 100644
--- a/apps/dokploy/components/dashboard/mongo/general/show-general-mongo.tsx
+++ b/apps/dokploy/components/dashboard/mongo/general/show-general-mongo.tsx
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
diff --git a/apps/dokploy/components/dashboard/mongo/general/show-internal-mongo-credentials.tsx b/apps/dokploy/components/dashboard/mongo/general/show-internal-mongo-credentials.tsx
index 6636688d9..e66ea8c36 100644
--- a/apps/dokploy/components/dashboard/mongo/general/show-internal-mongo-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mongo/general/show-internal-mongo-credentials.tsx
@@ -3,7 +3,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import React from "react";
interface Props {
mongoId: string;
diff --git a/apps/dokploy/components/dashboard/monitoring/free/container/show-free-compose-monitoring.tsx b/apps/dokploy/components/dashboard/monitoring/free/container/show-free-compose-monitoring.tsx
index 99be6d9d9..2bf6c9005 100644
--- a/apps/dokploy/components/dashboard/monitoring/free/container/show-free-compose-monitoring.tsx
+++ b/apps/dokploy/components/dashboard/monitoring/free/container/show-free-compose-monitoring.tsx
@@ -1,6 +1,5 @@
import { Button } from "@/components/ui/button";
import {
- Card,
CardContent,
CardDescription,
CardHeader,
diff --git a/apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx b/apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx
index 64a46bdb2..278e09360 100644
--- a/apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx
+++ b/apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx
@@ -1,13 +1,7 @@
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Progress } from "@/components/ui/progress";
import { api } from "@/utils/api";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { DockerBlockChart } from "./docker-block-chart";
import { DockerCpuChart } from "./docker-cpu-chart";
import { DockerDiskChart } from "./docker-disk-chart";
diff --git a/apps/dokploy/components/dashboard/monitoring/paid/servers/show-paid-monitoring.tsx b/apps/dokploy/components/dashboard/monitoring/paid/servers/show-paid-monitoring.tsx
index 87c030570..e299cfb38 100644
--- a/apps/dokploy/components/dashboard/monitoring/paid/servers/show-paid-monitoring.tsx
+++ b/apps/dokploy/components/dashboard/monitoring/paid/servers/show-paid-monitoring.tsx
@@ -7,7 +7,6 @@ import {
} from "@/components/ui/select";
import { api } from "@/utils/api";
import { Clock, Cpu, HardDrive, Loader2, MemoryStick } from "lucide-react";
-import type React from "react";
import { useEffect, useState } from "react";
import { CPUChart } from "./cpu-chart";
import { DiskChart } from "./disk-chart";
diff --git a/apps/dokploy/components/dashboard/mysql/general/show-external-mysql-credentials.tsx b/apps/dokploy/components/dashboard/mysql/general/show-external-mysql-credentials.tsx
index dc1ca3a7d..7a0527b17 100644
--- a/apps/dokploy/components/dashboard/mysql/general/show-external-mysql-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mysql/general/show-external-mysql-credentials.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/mysql/general/show-general-mysql.tsx b/apps/dokploy/components/dashboard/mysql/general/show-general-mysql.tsx
index 56a191ceb..13f46caee 100644
--- a/apps/dokploy/components/dashboard/mysql/general/show-general-mysql.tsx
+++ b/apps/dokploy/components/dashboard/mysql/general/show-general-mysql.tsx
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
diff --git a/apps/dokploy/components/dashboard/mysql/general/show-internal-mysql-credentials.tsx b/apps/dokploy/components/dashboard/mysql/general/show-internal-mysql-credentials.tsx
index 2c09efb84..3f1872371 100644
--- a/apps/dokploy/components/dashboard/mysql/general/show-internal-mysql-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mysql/general/show-internal-mysql-credentials.tsx
@@ -3,7 +3,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import React from "react";
interface Props {
mysqlId: string;
diff --git a/apps/dokploy/components/dashboard/mysql/update-mysql.tsx b/apps/dokploy/components/dashboard/mysql/update-mysql.tsx
index 645575cdc..efe1eb11d 100644
--- a/apps/dokploy/components/dashboard/mysql/update-mysql.tsx
+++ b/apps/dokploy/components/dashboard/mysql/update-mysql.tsx
@@ -21,7 +21,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, PenBoxIcon, SquarePen } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/organization/handle-organization.tsx b/apps/dokploy/components/dashboard/organization/handle-organization.tsx
index 24bb5c0eb..905a244cc 100644
--- a/apps/dokploy/components/dashboard/organization/handle-organization.tsx
+++ b/apps/dokploy/components/dashboard/organization/handle-organization.tsx
@@ -12,7 +12,7 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import { PenBoxIcon, Plus, SquarePen } from "lucide-react";
+import { PenBoxIcon, Plus } from "lucide-react";
import { useEffect, useState } from "react";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
index 6e912db95..2bae245ec 100644
--- a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
+++ b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
@@ -11,7 +11,7 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect } from "react";
+import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/postgres/general/show-external-postgres-credentials.tsx b/apps/dokploy/components/dashboard/postgres/general/show-external-postgres-credentials.tsx
index e8fff7dca..dbd57d0bf 100644
--- a/apps/dokploy/components/dashboard/postgres/general/show-external-postgres-credentials.tsx
+++ b/apps/dokploy/components/dashboard/postgres/general/show-external-postgres-credentials.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/postgres/general/show-general-postgres.tsx b/apps/dokploy/components/dashboard/postgres/general/show-general-postgres.tsx
index 43c3f4322..89d275236 100644
--- a/apps/dokploy/components/dashboard/postgres/general/show-general-postgres.tsx
+++ b/apps/dokploy/components/dashboard/postgres/general/show-general-postgres.tsx
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
diff --git a/apps/dokploy/components/dashboard/postgres/general/show-internal-postgres-credentials.tsx b/apps/dokploy/components/dashboard/postgres/general/show-internal-postgres-credentials.tsx
index e01226101..545150f87 100644
--- a/apps/dokploy/components/dashboard/postgres/general/show-internal-postgres-credentials.tsx
+++ b/apps/dokploy/components/dashboard/postgres/general/show-internal-postgres-credentials.tsx
@@ -3,7 +3,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import React from "react";
interface Props {
postgresId: string;
diff --git a/apps/dokploy/components/dashboard/postgres/update-postgres.tsx b/apps/dokploy/components/dashboard/postgres/update-postgres.tsx
index 54ad5bce0..7be6908f1 100644
--- a/apps/dokploy/components/dashboard/postgres/update-postgres.tsx
+++ b/apps/dokploy/components/dashboard/postgres/update-postgres.tsx
@@ -21,7 +21,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, PenBoxIcon, SquarePen } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/project/add-database.tsx b/apps/dokploy/components/dashboard/project/add-database.tsx
index 1ca0d6a5e..cd75ba468 100644
--- a/apps/dokploy/components/dashboard/project/add-database.tsx
+++ b/apps/dokploy/components/dashboard/project/add-database.tsx
@@ -18,7 +18,6 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import {
Form,
FormControl,
- FormDescription,
FormField,
FormItem,
FormLabel,
diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx
index cc6962aab..3965f8172 100644
--- a/apps/dokploy/components/dashboard/project/add-template.tsx
+++ b/apps/dokploy/components/dashboard/project/add-template.tsx
@@ -57,7 +57,6 @@ import {
BookText,
CheckIcon,
ChevronsUpDown,
- Code,
Github,
Globe,
HelpCircle,
diff --git a/apps/dokploy/components/dashboard/projects/handle-project.tsx b/apps/dokploy/components/dashboard/projects/handle-project.tsx
index 492c03c93..f5d62dfc6 100644
--- a/apps/dokploy/components/dashboard/projects/handle-project.tsx
+++ b/apps/dokploy/components/dashboard/projects/handle-project.tsx
@@ -21,7 +21,6 @@ import {
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
-import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { PlusIcon, SquarePen } from "lucide-react";
diff --git a/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx b/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
index 40ae0574e..25b5f2ba7 100644
--- a/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
+++ b/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
@@ -19,7 +19,7 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/redis/general/show-general-redis.tsx b/apps/dokploy/components/dashboard/redis/general/show-general-redis.tsx
index ec4aeb6cb..e309ef49a 100644
--- a/apps/dokploy/components/dashboard/redis/general/show-general-redis.tsx
+++ b/apps/dokploy/components/dashboard/redis/general/show-general-redis.tsx
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { api } from "@/utils/api";
import { Ban, CheckCircle2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState } from "react";
+import { useState } from "react";
import { toast } from "sonner";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
diff --git a/apps/dokploy/components/dashboard/redis/general/show-internal-redis-credentials.tsx b/apps/dokploy/components/dashboard/redis/general/show-internal-redis-credentials.tsx
index 092006748..47ad0df0b 100644
--- a/apps/dokploy/components/dashboard/redis/general/show-internal-redis-credentials.tsx
+++ b/apps/dokploy/components/dashboard/redis/general/show-internal-redis-credentials.tsx
@@ -3,7 +3,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { api } from "@/utils/api";
-import React from "react";
interface Props {
redisId: string;
diff --git a/apps/dokploy/components/dashboard/redis/update-redis.tsx b/apps/dokploy/components/dashboard/redis/update-redis.tsx
index c3557bee8..193aec3b3 100644
--- a/apps/dokploy/components/dashboard/redis/update-redis.tsx
+++ b/apps/dokploy/components/dashboard/redis/update-redis.tsx
@@ -21,7 +21,7 @@ import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle, PenBoxIcon, SquarePen } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/requests/columns.tsx b/apps/dokploy/components/dashboard/requests/columns.tsx
index 529d64a48..c1814190e 100644
--- a/apps/dokploy/components/dashboard/requests/columns.tsx
+++ b/apps/dokploy/components/dashboard/requests/columns.tsx
@@ -3,7 +3,6 @@ import { Button } from "@/components/ui/button";
import type { ColumnDef } from "@tanstack/react-table";
import { format } from "date-fns";
import { ArrowUpDown } from "lucide-react";
-import * as React from "react";
import type { LogEntry } from "./show-requests";
export const getStatusColor = (status: number) => {
diff --git a/apps/dokploy/components/dashboard/requests/show-requests.tsx b/apps/dokploy/components/dashboard/requests/show-requests.tsx
index 05ba6e51f..c3d92dd6d 100644
--- a/apps/dokploy/components/dashboard/requests/show-requests.tsx
+++ b/apps/dokploy/components/dashboard/requests/show-requests.tsx
@@ -11,7 +11,6 @@ import {
import { type RouterOutputs, api } from "@/utils/api";
import { ArrowDownUp } from "lucide-react";
import Link from "next/link";
-import * as React from "react";
import { toast } from "sonner";
import { RequestDistributionChart } from "./request-distribution-chart";
import { RequestsTable } from "./requests-table";
diff --git a/apps/dokploy/components/dashboard/search-command.tsx b/apps/dokploy/components/dashboard/search-command.tsx
index 7ea53d72f..5726dc99a 100644
--- a/apps/dokploy/components/dashboard/search-command.tsx
+++ b/apps/dokploy/components/dashboard/search-command.tsx
@@ -7,9 +7,7 @@ import {
PostgresqlIcon,
RedisIcon,
} from "@/components/icons/data-tools-icons";
-import { Badge } from "@/components/ui/badge";
import {
- Command,
CommandDialog,
CommandEmpty,
CommandGroup,
diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
index c76ec33e8..029eaa90f 100644
--- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
+++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
@@ -23,7 +23,7 @@ import {
PlusIcon,
} from "lucide-react";
import Link from "next/link";
-import React, { useState } from "react";
+import { useState } from "react";
const stripePromise = loadStripe(
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!,
diff --git a/apps/dokploy/components/dashboard/settings/billing/show-welcome-dokploy.tsx b/apps/dokploy/components/dashboard/settings/billing/show-welcome-dokploy.tsx
index 201aed445..64362b25c 100644
--- a/apps/dokploy/components/dashboard/settings/billing/show-welcome-dokploy.tsx
+++ b/apps/dokploy/components/dashboard/settings/billing/show-welcome-dokploy.tsx
@@ -6,7 +6,6 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { api } from "@/utils/api";
-import type React from "react";
import { useEffect, useState } from "react";
export const ShowWelcomeDokploy = () => {
diff --git a/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx b/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
index b55396bfe..ba3eefa56 100644
--- a/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
+++ b/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
@@ -33,7 +33,6 @@ import {
} from "@/components/ui/tooltip";
import { api } from "@/utils/api";
import { Boxes, HelpCircle, LockIcon, MoreHorizontal } from "lucide-react";
-import React from "react";
import { toast } from "sonner";
import { AddNode } from "./add-node";
import { ShowNodeData } from "./show-node-data";
diff --git a/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx b/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
index 9cb605a64..2c0f30466 100644
--- a/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
+++ b/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
@@ -1,8 +1,4 @@
-import {
- BitbucketIcon,
- GithubIcon,
- GitlabIcon,
-} from "@/components/icons/data-tools-icons";
+import { BitbucketIcon } from "@/components/icons/data-tools-icons";
import { AlertBlock } from "@/components/shared/alert-block";
import { Button } from "@/components/ui/button";
import { CardContent } from "@/components/ui/card";
diff --git a/apps/dokploy/components/dashboard/settings/git/bitbucket/edit-bitbucket-provider.tsx b/apps/dokploy/components/dashboard/settings/git/bitbucket/edit-bitbucket-provider.tsx
index 25c5e5daf..e5a7f7529 100644
--- a/apps/dokploy/components/dashboard/settings/git/bitbucket/edit-bitbucket-provider.tsx
+++ b/apps/dokploy/components/dashboard/settings/git/bitbucket/edit-bitbucket-provider.tsx
@@ -20,7 +20,7 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { Edit, PenBoxIcon } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/settings/git/gitlab/edit-gitlab-provider.tsx b/apps/dokploy/components/dashboard/settings/git/gitlab/edit-gitlab-provider.tsx
index fb688b89d..6c5d488eb 100644
--- a/apps/dokploy/components/dashboard/settings/git/gitlab/edit-gitlab-provider.tsx
+++ b/apps/dokploy/components/dashboard/settings/git/gitlab/edit-gitlab-provider.tsx
@@ -20,7 +20,7 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { Edit, PenBoxIcon } from "lucide-react";
+import { PenBoxIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx b/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
index b1da3ec1a..918df4353 100644
--- a/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
@@ -3,7 +3,6 @@ import {
Dialog,
DialogContent,
DialogDescription,
- DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
index ca1bf3c21..f4299709a 100644
--- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
@@ -1,5 +1,4 @@
import { AlertBlock } from "@/components/shared/alert-block";
-import { DialogAction } from "@/components/shared/dialog-action";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -18,7 +17,6 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
-import { authClient } from "@/lib/auth-client";
import { generateSHA256Hash } from "@/lib/utils";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx
index 3a1af2063..f57dad3cd 100644
--- a/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx
@@ -1,5 +1,4 @@
import { Button } from "@/components/ui/button";
-import React from "react";
import { UpdateServerIp } from "@/components/dashboard/settings/web-server/update-server-ip";
import {
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
index c45c0c8b5..cb60effd1 100644
--- a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
@@ -1,5 +1,4 @@
import { Button } from "@/components/ui/button";
-import React from "react";
import {
DropdownMenu,
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx
index 17a6ae757..0968931d7 100644
--- a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx
@@ -1,14 +1,4 @@
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
-import React from "react";
import {
DropdownMenu,
@@ -20,10 +10,8 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { api } from "@/utils/api";
-import { toast } from "sonner";
-
-import { cn } from "@/lib/utils";
import { useTranslation } from "next-i18next";
+import { toast } from "sonner";
import { EditTraefikEnv } from "../../web-server/edit-traefik-env";
import { ManageTraefikPorts } from "../../web-server/manage-traefik-ports";
import { ShowModalLogs } from "../../web-server/show-modal-logs";
diff --git a/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx b/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
index 3cda7e806..ec60fed6d 100644
--- a/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
@@ -9,7 +9,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { api } from "@/utils/api";
-import { TRPCClientError } from "@trpc/client";
import { CheckCircle2, Cpu, Loader2, RefreshCw, XCircle } from "lucide-react";
import { useEffect, useState } from "react";
import { toast } from "sonner";
diff --git a/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx b/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
index db9545a64..23173047e 100644
--- a/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
@@ -2,7 +2,6 @@ import { AlertBlock } from "@/components/shared/alert-block";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
- Card,
CardContent,
CardDescription,
CardHeader,
@@ -30,7 +29,6 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
-import { ScrollArea } from "@/components/ui/scroll-area";
import { extractServices } from "@/pages/dashboard/project/[projectId]";
import { api } from "@/utils/api";
import { useUrl } from "@/utils/hooks/use-url";
diff --git a/apps/dokploy/components/dashboard/settings/servers/show-docker-containers-modal.tsx b/apps/dokploy/components/dashboard/settings/servers/show-docker-containers-modal.tsx
index 1cdab23bc..ad82085c7 100644
--- a/apps/dokploy/components/dashboard/settings/servers/show-docker-containers-modal.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/show-docker-containers-modal.tsx
@@ -1,10 +1,4 @@
-import {
- Dialog,
- DialogContent,
- DialogHeader,
- DialogTitle,
- DialogTrigger,
-} from "@/components/ui/dialog";
+import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { useState } from "react";
import { ShowContainers } from "../../docker/show/show-containers";
diff --git a/apps/dokploy/components/dashboard/settings/servers/show-swarm-overview-modal.tsx b/apps/dokploy/components/dashboard/settings/servers/show-swarm-overview-modal.tsx
index a47005d07..b86311840 100644
--- a/apps/dokploy/components/dashboard/settings/servers/show-swarm-overview-modal.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/show-swarm-overview-modal.tsx
@@ -1,12 +1,5 @@
-import {
- Dialog,
- DialogContent,
- DialogHeader,
- DialogTitle,
- DialogTrigger,
-} from "@/components/ui/dialog";
+import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
-import { ContainerIcon } from "lucide-react";
import { useState } from "react";
import SwarmMonitorCard from "../../swarm/monitoring-card";
diff --git a/apps/dokploy/components/dashboard/settings/users/show-users.tsx b/apps/dokploy/components/dashboard/settings/users/show-users.tsx
index 0ccb23e7d..ff56698e4 100644
--- a/apps/dokploy/components/dashboard/settings/users/show-users.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/show-users.tsx
@@ -26,7 +26,6 @@ import {
} from "@/components/ui/table";
import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
-import copy from "copy-to-clipboard";
import { format } from "date-fns";
import { MoreHorizontal, Users } from "lucide-react";
import { Loader2 } from "lucide-react";
@@ -134,12 +133,45 @@ export const ShowUsers = () => {
)}
{member.role !== "owner" && (
- {
- if (isCloud) {
+ <>
+ {!isCloud && (
+ {
+ await mutateAsync({
+ userId: member.user.id,
+ })
+ .then(() => {
+ toast.success(
+ "User deleted successfully",
+ );
+ refetch();
+ })
+ .catch(() => {
+ toast.error(
+ "Error deleting destination",
+ );
+ });
+ }}
+ >
+
+ e.preventDefault()
+ }
+ >
+ Delete User
+
+
+ )}
+
+ {
const { error } =
await authClient.organization.removeMember(
{
@@ -149,39 +181,24 @@ export const ShowUsers = () => {
if (!error) {
toast.success(
- "User deleted successfully",
+ "User unlinked successfully",
);
refetch();
} else {
toast.error(
- "Error deleting user",
+ "Error unlinking user",
);
}
- } else {
- await mutateAsync({
- userId: member.user.id,
- })
- .then(() => {
- toast.success(
- "User deleted successfully",
- );
- refetch();
- })
- .catch(() => {
- toast.error(
- "Error deleting destination",
- );
- });
- }
- }}
- >
- e.preventDefault()}
+ }}
>
- Delete User
-
-
+ e.preventDefault()}
+ >
+ Unlink User
+
+
+ >
)}
diff --git a/apps/dokploy/components/dashboard/settings/web-domain.tsx b/apps/dokploy/components/dashboard/settings/web-domain.tsx
index 13750e2aa..3b3f70ba5 100644
--- a/apps/dokploy/components/dashboard/settings/web-domain.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-domain.tsx
@@ -24,7 +24,7 @@ import {
} from "@/components/ui/select";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { GlobeIcon, ServerIcon, User } from "lucide-react";
+import { GlobeIcon } from "lucide-react";
import { useTranslation } from "next-i18next";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
diff --git a/apps/dokploy/components/dashboard/settings/web-server.tsx b/apps/dokploy/components/dashboard/settings/web-server.tsx
index 0cc4772f2..326cb0eaf 100644
--- a/apps/dokploy/components/dashboard/settings/web-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server.tsx
@@ -5,11 +5,9 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card";
-import { cn } from "@/lib/utils";
import { api } from "@/utils/api";
import { ServerIcon } from "lucide-react";
import { useTranslation } from "next-i18next";
-import React from "react";
import { ShowDokployActions } from "./servers/actions/show-dokploy-actions";
import { ShowStorageActions } from "./servers/actions/show-storage-actions";
import { ShowTraefikActions } from "./servers/actions/show-traefik-actions";
diff --git a/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx
index f68046dbb..e30408e6d 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx
@@ -18,7 +18,6 @@ import { cn } from "@/lib/utils";
import { zodResolver } from "@hookform/resolvers/zod";
import { Settings } from "lucide-react";
import { useTranslation } from "next-i18next";
-import React from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
diff --git a/apps/dokploy/components/dashboard/settings/web-server/show-modal-logs.tsx b/apps/dokploy/components/dashboard/settings/web-server/show-modal-logs.tsx
index 12e7b6704..bedecf517 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/show-modal-logs.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/show-modal-logs.tsx
@@ -6,7 +6,6 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
-import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Label } from "@/components/ui/label";
import {
Select,
diff --git a/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx b/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx
index 816687f58..2cfc459b6 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/update-server.tsx
@@ -1,4 +1,3 @@
-import { AlertBlock } from "@/components/shared/alert-block";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -14,7 +13,6 @@ import {
Info,
RefreshCcw,
Server,
- ServerCrash,
Sparkles,
Stars,
} from "lucide-react";
diff --git a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
index 69ccc41d6..ab058e851 100644
--- a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
+++ b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
@@ -1,6 +1,5 @@
import type { ColumnDef } from "@tanstack/react-table";
import { ArrowUpDown, MoreHorizontal } from "lucide-react";
-import * as React from "react";
import { Button } from "@/components/ui/button";
import {
diff --git a/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx b/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
index 41d7b113b..681afd755 100644
--- a/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
+++ b/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
@@ -9,7 +9,6 @@ import {
} from "@/components/ui/dialog";
import { api } from "@/utils/api";
import { Layers, Loader2 } from "lucide-react";
-import React from "react";
import { type ApplicationList, columns } from "./columns";
import { DataTable } from "./data-table";
diff --git a/apps/dokploy/components/icons/data-tools-icons.tsx b/apps/dokploy/components/icons/data-tools-icons.tsx
index 93da14a06..e2c0922a8 100644
--- a/apps/dokploy/components/icons/data-tools-icons.tsx
+++ b/apps/dokploy/components/icons/data-tools-icons.tsx
@@ -1,5 +1,4 @@
import { cn } from "@/lib/utils";
-import React from "react";
// https://worldvectorlogo.com/downloaded/redis Ref
diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx
index e0931b08f..939d10841 100644
--- a/apps/dokploy/components/layouts/side.tsx
+++ b/apps/dokploy/components/layouts/side.tsx
@@ -1,15 +1,14 @@
"use client";
import {
Activity,
- AudioWaveform,
BarChartHorizontalBigIcon,
Bell,
BlocksIcon,
BookIcon,
Boxes,
ChevronRight,
+ ChevronsUpDown,
CircleHelp,
- Command,
CreditCard,
Database,
Folder,
@@ -27,8 +26,6 @@ import {
Trash2,
User,
Users,
- ChevronsUpDown,
- Plus,
} from "lucide-react";
import { usePathname } from "next/navigation";
import type * as React from "react";
@@ -47,6 +44,14 @@ import {
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/collapsible";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
import { Separator } from "@/components/ui/separator";
import {
SIDEBAR_COOKIE_NAME,
@@ -68,29 +73,20 @@ import {
SidebarTrigger,
useSidebar,
} from "@/components/ui/sidebar";
+import { authClient } from "@/lib/auth-client";
import { cn } from "@/lib/utils";
import type { AppRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import type { inferRouterOutputs } from "@trpc/server";
import Link from "next/link";
import { useRouter } from "next/router";
-import { Logo } from "../shared/logo";
-import { UpdateServerButton } from "./update-server";
-import { UserNav } from "./user-nav";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { authClient } from "@/lib/auth-client";
import { toast } from "sonner";
import { AddOrganization } from "../dashboard/organization/handle-organization";
import { DialogAction } from "../shared/dialog-action";
+import { Logo } from "../shared/logo";
import { Button } from "../ui/button";
+import { UpdateServerButton } from "./update-server";
+import { UserNav } from "./user-nav";
// The types of the queries we are going to use
type AuthQueryOutput = inferRouterOutputs["auth"]["get"];
diff --git a/apps/dokploy/components/layouts/user-nav.tsx b/apps/dokploy/components/layouts/user-nav.tsx
index 30579f300..196f6d77d 100644
--- a/apps/dokploy/components/layouts/user-nav.tsx
+++ b/apps/dokploy/components/layouts/user-nav.tsx
@@ -20,9 +20,7 @@ import { Languages } from "@/lib/languages";
import { api } from "@/utils/api";
import useLocale from "@/utils/hooks/use-locale";
import { ChevronsUpDown } from "lucide-react";
-import { useTranslation } from "next-i18next";
import { useRouter } from "next/router";
-import { useEffect, useRef, useState } from "react";
import { ModeToggle } from "../ui/modeToggle";
import { SidebarMenuButton } from "../ui/sidebar";
diff --git a/apps/dokploy/components/shared/dialog-action.tsx b/apps/dokploy/components/shared/dialog-action.tsx
index 3724242d0..444440a2d 100644
--- a/apps/dokploy/components/shared/dialog-action.tsx
+++ b/apps/dokploy/components/shared/dialog-action.tsx
@@ -9,7 +9,6 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
-import { Button } from "../ui/button";
interface Props {
title?: string | React.ReactNode;
diff --git a/apps/dokploy/components/shared/drawer-logs.tsx b/apps/dokploy/components/shared/drawer-logs.tsx
index f5a56cd6a..5e4ab554b 100644
--- a/apps/dokploy/components/shared/drawer-logs.tsx
+++ b/apps/dokploy/components/shared/drawer-logs.tsx
@@ -1,6 +1,3 @@
-import { DialogAction } from "@/components/shared/dialog-action";
-import { Button } from "@/components/ui/button";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
Sheet,
SheetContent,
@@ -8,10 +5,8 @@ import {
SheetHeader,
SheetTitle,
} from "@/components/ui/sheet";
-import { api } from "@/utils/api";
-import { Ban, CheckCircle2, Loader2, RefreshCcw, Terminal } from "lucide-react";
-import React, { useState, useEffect, useRef } from "react";
-import { toast } from "sonner";
+import { Loader2 } from "lucide-react";
+import { useEffect, useRef, useState } from "react";
import { TerminalLine } from "../dashboard/docker/logs/terminal-line";
import type { LogLine } from "../dashboard/docker/logs/utils";
diff --git a/apps/dokploy/components/shared/logo.tsx b/apps/dokploy/components/shared/logo.tsx
index 5d192cfdc..086ef3b0c 100644
--- a/apps/dokploy/components/shared/logo.tsx
+++ b/apps/dokploy/components/shared/logo.tsx
@@ -1,5 +1,3 @@
-import React from "react";
-
interface Props {
className?: string;
}
diff --git a/apps/dokploy/components/ui/modeToggle.tsx b/apps/dokploy/components/ui/modeToggle.tsx
index 7965a3395..9b6ba27b9 100644
--- a/apps/dokploy/components/ui/modeToggle.tsx
+++ b/apps/dokploy/components/ui/modeToggle.tsx
@@ -3,7 +3,6 @@
import { Button } from "@/components/ui/button";
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
-import * as React from "react";
export function ModeToggle() {
const { theme, setTheme } = useTheme();
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
index 38f48784c..febd1c0e2 100644
--- a/apps/dokploy/migrate.ts
+++ b/apps/dokploy/migrate.ts
@@ -1,5 +1,4 @@
import { drizzle } from "drizzle-orm/postgres-js";
-import { migrate } from "drizzle-orm/postgres-js/migrator";
import { nanoid } from "nanoid";
import postgres from "postgres";
import * as schema from "./server/db/schema";
diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts
index 761c38663..5e64d8b26 100644
--- a/apps/dokploy/pages/api/deploy/github.ts
+++ b/apps/dokploy/pages/api/deploy/github.ts
@@ -3,9 +3,7 @@ import { applications, compose, github } from "@/server/db/schema";
import type { DeploymentJob } from "@/server/queues/queue-types";
import { myQueue } from "@/server/queues/queueSetup";
import { deploy } from "@/server/utils/deploy";
-import { generateRandomDomain } from "@/templates/utils";
import {
- type Domain,
IS_CLOUD,
createPreviewDeployment,
findPreviewDeploymentByApplicationId,
diff --git a/apps/dokploy/pages/api/providers/github/setup.ts b/apps/dokploy/pages/api/providers/github/setup.ts
index 9a03ed3d7..ac5e7a6b0 100644
--- a/apps/dokploy/pages/api/providers/github/setup.ts
+++ b/apps/dokploy/pages/api/providers/github/setup.ts
@@ -1,13 +1,6 @@
import { db } from "@/server/db";
import { github } from "@/server/db/schema";
-import {
- auth,
- createGithub,
- findAdminByAuthId,
- findAuthById,
- findUserByAuthId,
- findUserById,
-} from "@dokploy/server";
+import { createGithub } from "@dokploy/server";
import { eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
import { Octokit } from "octokit";
diff --git a/apps/dokploy/pages/api/stripe/webhook.ts b/apps/dokploy/pages/api/stripe/webhook.ts
index d9cbedc8a..6200a79ec 100644
--- a/apps/dokploy/pages/api/stripe/webhook.ts
+++ b/apps/dokploy/pages/api/stripe/webhook.ts
@@ -1,7 +1,7 @@
import { buffer } from "node:stream/consumers";
import { db } from "@/server/db";
import { server, users_temp } from "@/server/db/schema";
-import { findAdminById, findUserById } from "@dokploy/server";
+import { findUserById } from "@dokploy/server";
import { asc, eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
import Stripe from "stripe";
diff --git a/apps/dokploy/pages/dashboard/docker.tsx b/apps/dokploy/pages/dashboard/docker.tsx
index 5685dcfc5..a9d80353f 100644
--- a/apps/dokploy/pages/dashboard/docker.tsx
+++ b/apps/dokploy/pages/dashboard/docker.tsx
@@ -5,7 +5,7 @@ import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Dashboard = () => {
diff --git a/apps/dokploy/pages/dashboard/monitoring.tsx b/apps/dokploy/pages/dashboard/monitoring.tsx
index c5c617a7f..4d8b072f5 100644
--- a/apps/dokploy/pages/dashboard/monitoring.tsx
+++ b/apps/dokploy/pages/dashboard/monitoring.tsx
@@ -1,17 +1,13 @@
import { ContainerFreeMonitoring } from "@/components/dashboard/monitoring/free/container/show-free-container-monitoring";
import { ShowPaidMonitoring } from "@/components/dashboard/monitoring/paid/servers/show-paid-monitoring";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
-import { AlertBlock } from "@/components/shared/alert-block";
import { Card } from "@/components/ui/card";
-import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { useLocalStorage } from "@/hooks/useLocalStorage";
import { api } from "@/utils/api";
import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
import { Loader2 } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
-import type React from "react";
import type { ReactElement } from "react";
const BASE_URL = "http://localhost:3001/metrics";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
index 7eebf7083..59dba68ce 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -28,7 +28,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -42,7 +41,7 @@ import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
import copy from "copy-to-clipboard";
-import { GlobeIcon, HelpCircle, ServerOff, Trash2 } from "lucide-react";
+import { GlobeIcon, HelpCircle, ServerOff } from "lucide-react";
import type {
GetServerSidePropsContext,
InferGetServerSidePropsType,
@@ -50,7 +49,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, useEffect, type ReactElement } from "react";
+import { type ReactElement, useEffect, useState } from "react";
import { toast } from "sonner";
import superjson from "superjson";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
index 46c9864b4..c1331e23f 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -22,7 +22,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -45,7 +44,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, useEffect, type ReactElement } from "react";
+import { type ReactElement, useEffect, useState } from "react";
import { toast } from "sonner";
import superjson from "superjson";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
index 6aa7677a3..033b88a9d 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
@@ -24,7 +24,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -37,7 +36,7 @@ import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
-import { HelpCircle, ServerOff, Trash2 } from "lucide-react";
+import { HelpCircle, ServerOff } from "lucide-react";
import type {
GetServerSidePropsContext,
InferGetServerSidePropsType,
@@ -45,8 +44,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, type ReactElement } from "react";
-import { toast } from "sonner";
+import { type ReactElement, useState } from "react";
import superjson from "superjson";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
index 2e3aae31f..dea8cd57b 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
@@ -24,7 +24,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -37,7 +36,7 @@ import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
-import { HelpCircle, ServerOff, Trash2 } from "lucide-react";
+import { HelpCircle, ServerOff } from "lucide-react";
import type {
GetServerSidePropsContext,
InferGetServerSidePropsType,
@@ -45,8 +44,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, type ReactElement } from "react";
-import { toast } from "sonner";
+import { type ReactElement, useState } from "react";
import superjson from "superjson";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
index 3e75603dd..cc4eb4aa3 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
@@ -24,7 +24,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -37,7 +36,7 @@ import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
-import { HelpCircle, ServerOff, Trash2 } from "lucide-react";
+import { HelpCircle, ServerOff } from "lucide-react";
import type {
GetServerSidePropsContext,
InferGetServerSidePropsType,
@@ -45,8 +44,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, type ReactElement } from "react";
-import { toast } from "sonner";
+import { type ReactElement, useState } from "react";
import superjson from "superjson";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
index dd0c312d0..d0f1dc106 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
@@ -24,7 +24,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -37,7 +36,7 @@ import { appRouter } from "@/server/api/root";
import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
-import { HelpCircle, ServerOff, Trash2 } from "lucide-react";
+import { HelpCircle, ServerOff } from "lucide-react";
import type {
GetServerSidePropsContext,
InferGetServerSidePropsType,
@@ -45,8 +44,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, type ReactElement } from "react";
-import { toast } from "sonner";
+import { type ReactElement, useState } from "react";
import superjson from "superjson";
type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
index c7e5643a6..2b053df47 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
@@ -23,7 +23,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Label } from "@/components/ui/label";
-import { Switch } from "@/components/ui/switch";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Tooltip,
@@ -44,8 +43,7 @@ import type {
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import React, { useState, type ReactElement } from "react";
-import { toast } from "sonner";
+import { type ReactElement, useState } from "react";
import superjson from "superjson";
type TabState = "projects" | "monitoring" | "settings" | "advanced";
diff --git a/apps/dokploy/pages/dashboard/projects.tsx b/apps/dokploy/pages/dashboard/projects.tsx
index abeee6695..49427c25b 100644
--- a/apps/dokploy/pages/dashboard/projects.tsx
+++ b/apps/dokploy/pages/dashboard/projects.tsx
@@ -6,7 +6,6 @@ import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
import dynamic from "next/dynamic";
-import type React from "react";
import type { ReactElement } from "react";
import superjson from "superjson";
diff --git a/apps/dokploy/pages/dashboard/requests.tsx b/apps/dokploy/pages/dashboard/requests.tsx
index 580b936a2..cb4545875 100644
--- a/apps/dokploy/pages/dashboard/requests.tsx
+++ b/apps/dokploy/pages/dashboard/requests.tsx
@@ -4,7 +4,6 @@ import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
import type { GetServerSidePropsContext } from "next";
import type { ReactElement } from "react";
-import * as React from "react";
export default function Requests() {
return ;
diff --git a/apps/dokploy/pages/dashboard/settings/billing.tsx b/apps/dokploy/pages/dashboard/settings/billing.tsx
index 3acce0b01..ee1ecdbe5 100644
--- a/apps/dokploy/pages/dashboard/settings/billing.tsx
+++ b/apps/dokploy/pages/dashboard/settings/billing.tsx
@@ -6,7 +6,7 @@ import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/certificates.tsx b/apps/dokploy/pages/dashboard/settings/certificates.tsx
index d045208e1..96bec90bf 100644
--- a/apps/dokploy/pages/dashboard/settings/certificates.tsx
+++ b/apps/dokploy/pages/dashboard/settings/certificates.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
return (
diff --git a/apps/dokploy/pages/dashboard/settings/cluster.tsx b/apps/dokploy/pages/dashboard/settings/cluster.tsx
index 8d70f8692..77ece29b8 100644
--- a/apps/dokploy/pages/dashboard/settings/cluster.tsx
+++ b/apps/dokploy/pages/dashboard/settings/cluster.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { IS_CLOUD, validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/destinations.tsx b/apps/dokploy/pages/dashboard/settings/destinations.tsx
index d9d17d538..8605a7c18 100644
--- a/apps/dokploy/pages/dashboard/settings/destinations.tsx
+++ b/apps/dokploy/pages/dashboard/settings/destinations.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/git-providers.tsx b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
index 7bacde246..4187a0ef7 100644
--- a/apps/dokploy/pages/dashboard/settings/git-providers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/index.tsx b/apps/dokploy/pages/dashboard/settings/index.tsx
index 2bfce2f2e..713e51133 100644
--- a/apps/dokploy/pages/dashboard/settings/index.tsx
+++ b/apps/dokploy/pages/dashboard/settings/index.tsx
@@ -17,7 +17,6 @@ import {
FormField,
FormItem,
FormLabel,
- FormMessage,
} from "@/components/ui/form";
import { Switch } from "@/components/ui/switch";
import { appRouter } from "@/server/api/root";
@@ -27,7 +26,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { createServerSideHelpers } from "@trpc/react-query/server";
import { Settings } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
-import React, { useEffect, type ReactElement } from "react";
+import { type ReactElement, useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import superjson from "superjson";
diff --git a/apps/dokploy/pages/dashboard/settings/notifications.tsx b/apps/dokploy/pages/dashboard/settings/notifications.tsx
index d0e0c65fe..76566fdf2 100644
--- a/apps/dokploy/pages/dashboard/settings/notifications.tsx
+++ b/apps/dokploy/pages/dashboard/settings/notifications.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/profile.tsx b/apps/dokploy/pages/dashboard/settings/profile.tsx
index 79a3366d4..446e6c875 100644
--- a/apps/dokploy/pages/dashboard/settings/profile.tsx
+++ b/apps/dokploy/pages/dashboard/settings/profile.tsx
@@ -9,7 +9,7 @@ import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/registry.tsx b/apps/dokploy/pages/dashboard/settings/registry.tsx
index 0a01e255f..678e0da46 100644
--- a/apps/dokploy/pages/dashboard/settings/registry.tsx
+++ b/apps/dokploy/pages/dashboard/settings/registry.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/server.tsx b/apps/dokploy/pages/dashboard/settings/server.tsx
index dbd049579..4f88c794b 100644
--- a/apps/dokploy/pages/dashboard/settings/server.tsx
+++ b/apps/dokploy/pages/dashboard/settings/server.tsx
@@ -1,4 +1,3 @@
-import { SetupMonitoring } from "@/components/dashboard/settings/servers/setup-monitoring";
import { WebDomain } from "@/components/dashboard/settings/web-domain";
import { WebServer } from "@/components/dashboard/settings/web-server";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
@@ -6,10 +5,8 @@ import { appRouter } from "@/server/api/root";
import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { IS_CLOUD, validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
-import { LayoutDashboardIcon } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
-import { toast } from "sonner";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/servers.tsx b/apps/dokploy/pages/dashboard/settings/servers.tsx
index 85ca5bb31..08d4ab694 100644
--- a/apps/dokploy/pages/dashboard/settings/servers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/servers.tsx
@@ -6,7 +6,7 @@ import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
index 8c5082e39..738c647d4 100644
--- a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
+++ b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
@@ -5,7 +5,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/settings/users.tsx b/apps/dokploy/pages/dashboard/settings/users.tsx
index e9fb65608..ac5355218 100644
--- a/apps/dokploy/pages/dashboard/settings/users.tsx
+++ b/apps/dokploy/pages/dashboard/settings/users.tsx
@@ -6,7 +6,7 @@ import { appRouter } from "@/server/api/root";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Page = () => {
diff --git a/apps/dokploy/pages/dashboard/traefik.tsx b/apps/dokploy/pages/dashboard/traefik.tsx
index 3153e80d3..90359ccd6 100644
--- a/apps/dokploy/pages/dashboard/traefik.tsx
+++ b/apps/dokploy/pages/dashboard/traefik.tsx
@@ -5,7 +5,7 @@ import { IS_CLOUD } from "@dokploy/server/constants";
import { validateRequest } from "@dokploy/server/lib/auth";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
-import React, { type ReactElement } from "react";
+import type { ReactElement } from "react";
import superjson from "superjson";
const Dashboard = () => {
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index 795d7a862..c910e78ec 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -1,8 +1,7 @@
-import { Login2FA } from "@/components/auth/login-2fa";
import { OnboardingLayout } from "@/components/layouts/onboarding-layout";
import { AlertBlock } from "@/components/shared/alert-block";
import { Logo } from "@/components/shared/logo";
-import { Button, buttonVariants } from "@/components/ui/button";
+import { Button } from "@/components/ui/button";
import { CardContent, CardDescription } from "@/components/ui/card";
import {
Dialog,
@@ -10,12 +9,10 @@ import {
DialogDescription,
DialogHeader,
DialogTitle,
- DialogTrigger,
} from "@/components/ui/dialog";
import {
Form,
FormControl,
- FormDescription,
FormField,
FormItem,
FormLabel,
@@ -29,19 +26,14 @@ import {
} from "@/components/ui/input-otp";
import { Label } from "@/components/ui/label";
import { authClient } from "@/lib/auth-client";
-import { cn } from "@/lib/utils";
-import { api } from "@/utils/api";
-import { IS_CLOUD, auth, isAdminPresent } from "@dokploy/server";
+import { IS_CLOUD, isAdminPresent } from "@dokploy/server";
import { validateRequest } from "@dokploy/server/lib/auth";
import { zodResolver } from "@hookform/resolvers/zod";
-import base32 from "hi-base32";
import { REGEXP_ONLY_DIGITS } from "input-otp";
-import { AlertTriangle } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
-import { TOTP } from "otpauth";
-import { type ReactElement, useEffect, useState } from "react";
+import { type ReactElement, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx
index c11cc8225..91ca1d0d7 100644
--- a/apps/dokploy/pages/invitation.tsx
+++ b/apps/dokploy/pages/invitation.tsx
@@ -2,12 +2,7 @@ import { OnboardingLayout } from "@/components/layouts/onboarding-layout";
import { AlertBlock } from "@/components/shared/alert-block";
import { Logo } from "@/components/shared/logo";
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardTitle,
-} from "@/components/ui/card";
+import { CardContent, CardDescription, CardTitle } from "@/components/ui/card";
import {
Form,
FormControl,
@@ -21,7 +16,7 @@ import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
import { IS_CLOUD, getUserByToken } from "@dokploy/server";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertCircle, AlertTriangle } from "lucide-react";
+import { AlertTriangle } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
diff --git a/apps/dokploy/pages/register.tsx b/apps/dokploy/pages/register.tsx
index e8fd15cf5..701d8f5b5 100644
--- a/apps/dokploy/pages/register.tsx
+++ b/apps/dokploy/pages/register.tsx
@@ -2,12 +2,7 @@ import { OnboardingLayout } from "@/components/layouts/onboarding-layout";
import { AlertBlock } from "@/components/shared/alert-block";
import { Logo } from "@/components/shared/logo";
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardTitle,
-} from "@/components/ui/card";
+import { CardContent, CardDescription, CardTitle } from "@/components/ui/card";
import {
Form,
FormControl,
@@ -27,7 +22,6 @@ import Link from "next/link";
import { useRouter } from "next/router";
import { type ReactElement, useEffect } from "react";
import { useForm } from "react-hook-form";
-import { toast } from "sonner";
import { z } from "zod";
const registerSchema = z
diff --git a/apps/dokploy/pages/send-reset-password.tsx b/apps/dokploy/pages/send-reset-password.tsx
index c4cd851ce..ce73fbb82 100644
--- a/apps/dokploy/pages/send-reset-password.tsx
+++ b/apps/dokploy/pages/send-reset-password.tsx
@@ -3,12 +3,7 @@ import { OnboardingLayout } from "@/components/layouts/onboarding-layout";
import { AlertBlock } from "@/components/shared/alert-block";
import { Logo } from "@/components/shared/logo";
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardTitle,
-} from "@/components/ui/card";
+import { CardContent, CardDescription, CardTitle } from "@/components/ui/card";
import {
Form,
FormControl,
diff --git a/apps/dokploy/server/api/routers/admin.ts b/apps/dokploy/server/api/routers/admin.ts
index 293b7dfe5..47bd9cd9c 100644
--- a/apps/dokploy/server/api/routers/admin.ts
+++ b/apps/dokploy/server/api/routers/admin.ts
@@ -1,119 +1,14 @@
-import {
- apiAssignPermissions,
- apiCreateUserInvitation,
- apiFindOneToken,
- apiRemoveUser,
- apiUpdateWebServerMonitoring,
-} from "@/server/db/schema";
+import { apiUpdateWebServerMonitoring } from "@/server/db/schema";
import {
IS_CLOUD,
- createInvitation,
- findOrganizationById,
findUserById,
- getUserByToken,
- removeUserById,
setupWebMonitoring,
updateUser,
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
-import { z } from "zod";
-import {
- adminProcedure,
- createTRPCRouter,
- protectedProcedure,
- publicProcedure,
-} from "../trpc";
+import { adminProcedure, createTRPCRouter } from "../trpc";
export const adminRouter = createTRPCRouter({
- one: adminProcedure.query(async ({ ctx }) => {
- const { sshPrivateKey, ...rest } = await findUserById(ctx.user.id);
- return {
- haveSSH: !!sshPrivateKey,
- ...rest,
- };
- }),
- update: adminProcedure
- .input(
- z.object({
- enableDockerCleanup: z.boolean(),
- }),
- )
- .mutation(async ({ input, ctx }) => {
- if (ctx.user.rol === "member") {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to update this admin",
- });
- }
- const user = await findUserById(ctx.user.ownerId);
- return updateUser(user.id, {});
- }),
- createUserInvitation: adminProcedure
- .input(apiCreateUserInvitation)
- .mutation(async ({ input, ctx }) => {
- try {
- await createInvitation(input, ctx.user.id);
- } catch (error) {
- throw new TRPCError({
- code: "BAD_REQUEST",
- message:
- "Error creating this user\ncheck if the email is not registered",
- cause: error,
- });
- }
- }),
- removeUser: adminProcedure
- .input(apiRemoveUser)
- .mutation(async ({ input, ctx }) => {
- try {
- const user = await findUserById(input.id);
-
- if (user.id !== ctx.user.ownerId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to delete this user",
- });
- }
-
- return await removeUserById(input.id);
- } catch (error) {
- throw new TRPCError({
- code: "BAD_REQUEST",
- message: "Error deleting this user",
- cause: error,
- });
- }
- }),
- getUserByToken: publicProcedure
- .input(apiFindOneToken)
- .query(async ({ input }) => {
- return await getUserByToken(input.token);
- }),
- assignPermissions: adminProcedure
- .input(apiAssignPermissions)
- .mutation(async ({ input, ctx }) => {
- try {
- const user = await findUserById(input.id);
-
- const organization = await findOrganizationById(
- ctx.session?.activeOrganizationId || "",
- );
-
- if (organization?.ownerId !== ctx.user.ownerId) {
- throw new TRPCError({
- code: "UNAUTHORIZED",
- message: "You are not allowed to assign permissions",
- });
- }
-
- await updateUser(user.id, {
- ...input,
- });
- } catch (error) {
- throw error;
- }
- }),
-
setupMonitoring: adminProcedure
.input(apiUpdateWebServerMonitoring)
.mutation(async ({ input, ctx }) => {
@@ -163,129 +58,4 @@ export const adminRouter = createTRPCRouter({
throw error;
}
}),
- getMetricsToken: protectedProcedure.query(async ({ ctx }) => {
- const user = await findUserById(ctx.user.ownerId);
- return {
- serverIp: user.serverIp,
- enabledFeatures: user.enablePaidFeatures,
- metricsConfig: user?.metricsConfig,
- };
- }),
-
- getServerMetrics: protectedProcedure
- .input(
- z.object({
- url: z.string(),
- token: z.string(),
- dataPoints: z.string(),
- }),
- )
- .query(async ({ ctx, input }) => {
- try {
- const url = new URL(input.url);
- url.searchParams.append("limit", input.dataPoints);
- const response = await fetch(url.toString(), {
- headers: {
- Authorization: `Bearer ${input.token}`,
- },
- });
- if (!response.ok) {
- throw new Error(
- `Error ${response.status}: ${response.statusText}. Ensure the container is running and this service is included in the monitoring configuration.`,
- );
- }
-
- const data = await response.json();
- if (!Array.isArray(data) || data.length === 0) {
- throw new Error(
- [
- "No monitoring data available. This could be because:",
- "",
- "1. You don't have setup the monitoring service, you can do in web server section.",
- "2. If you already have setup the monitoring service, wait a few minutes and refresh the page.",
- ].join("\n"),
- );
- }
- return data as {
- cpu: string;
- cpuModel: string;
- cpuCores: number;
- cpuPhysicalCores: number;
- cpuSpeed: number;
- os: string;
- distro: string;
- kernel: string;
- arch: string;
- memUsed: string;
- memUsedGB: string;
- memTotal: string;
- uptime: number;
- diskUsed: string;
- totalDisk: string;
- networkIn: string;
- networkOut: string;
- timestamp: string;
- }[];
- } catch (error) {
- throw error;
- }
- }),
- getContainerMetrics: protectedProcedure
- .input(
- z.object({
- url: z.string(),
- token: z.string(),
- appName: z.string(),
- dataPoints: z.string(),
- }),
- )
- .query(async ({ ctx, input }) => {
- try {
- if (!input.appName) {
- throw new Error(
- [
- "No Application Selected:",
- "",
- "Make Sure to select an application to monitor.",
- ].join("\n"),
- );
- }
- const url = new URL(`${input.url}/metrics/containers`);
- url.searchParams.append("limit", input.dataPoints);
- url.searchParams.append("appName", input.appName);
- const response = await fetch(url.toString(), {
- headers: {
- Authorization: `Bearer ${input.token}`,
- },
- });
- if (!response.ok) {
- throw new Error(
- `Error ${response.status}: ${response.statusText}. Please verify that the application "${input.appName}" is running and this service is included in the monitoring configuration.`,
- );
- }
-
- const data = await response.json();
- if (!Array.isArray(data) || data.length === 0) {
- throw new Error(
- [
- `No monitoring data available for "${input.appName}". This could be because:`,
- "",
- "1. The container was recently started - wait a few minutes for data to be collected",
- "2. The container is not running - verify its status",
- "3. The service is not included in your monitoring configuration",
- ].join("\n"),
- );
- }
- return data as {
- containerId: string;
- containerName: string;
- containerImage: string;
- containerLabels: string;
- containerCommand: string;
- containerCreated: string;
- }[];
- } catch (error) {
- throw error;
- }
- }),
});
diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts
index 269ac77b5..e1629b4cb 100644
--- a/apps/dokploy/server/api/routers/application.ts
+++ b/apps/dokploy/server/api/routers/application.ts
@@ -61,7 +61,12 @@ export const applicationRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -103,7 +108,12 @@ export const applicationRouter = createTRPCRouter({
.input(apiFindOneApplication)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.applicationId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.applicationId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const application = await findApplicationById(input.applicationId);
if (
@@ -149,7 +159,12 @@ export const applicationRouter = createTRPCRouter({
.input(apiFindOneApplication)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.applicationId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.applicationId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const application = await findApplicationById(input.applicationId);
@@ -186,7 +201,7 @@ export const applicationRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return result[0];
@@ -642,7 +657,7 @@ export const applicationRouter = createTRPCRouter({
}),
readAppMonitoring: protectedProcedure
.input(apiFindMonitoringStats)
- .query(async ({ input, ctx }) => {
+ .query(async ({ input }) => {
if (IS_CLOUD) {
throw new TRPCError({
code: "UNAUTHORIZED",
diff --git a/apps/dokploy/server/api/routers/auth.ts b/apps/dokploy/server/api/routers/auth.ts
index 4cfbe71a2..da3121b2e 100644
--- a/apps/dokploy/server/api/routers/auth.ts
+++ b/apps/dokploy/server/api/routers/auth.ts
@@ -12,14 +12,11 @@ import {
import { WEBSITE_URL } from "@/server/utils/stripe";
import {
IS_CLOUD,
- findAuthById,
findUserById,
- generate2FASecret,
getUserByToken,
sendDiscordNotification,
sendEmailNotification,
validateRequest,
- verify2FA,
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import * as bcrypt from "bcrypt";
@@ -273,42 +270,6 @@ export const authRouter = createTRPCRouter({
const user = await findUserById(input.userId);
return user;
}),
-
- generate2FASecret: protectedProcedure.query(async ({ ctx }) => {
- return await generate2FASecret(ctx.user.id);
- }),
- verify2FASetup: protectedProcedure.mutation(async ({ ctx, input }) => {
- // const auth = await findAuthById(ctx.user.authId);
- // await verify2FA(auth, input.secret, input.pin);
- // await updateAuthById(auth.id, {
- // is2FAEnabled: true,
- // secret: input.secret,
- // });
- // return auth;
- }),
-
- verifyLogin2FA: publicProcedure.mutation(async ({ ctx, input }) => {
- // const auth = await findAuthById(input.id);
-
- // await verify2FA(auth, auth.secret || "", input.pin);
-
- // const session = await lucia.createSession(auth.id, {});
-
- // ctx.res.appendHeader(
- // "Set-Cookie",
- // lucia.createSessionCookie(session.id).serialize(),
- // );
-
- return true;
- }),
- disable2FA: protectedProcedure.mutation(async ({ ctx }) => {
- // const auth = await findAuthById(ctx.user.authId);
- // await updateAuthById(auth.id, {
- // is2FAEnabled: false,
- // secret: null,
- // });
- // return auth;
- }),
sendResetPasswordEmail: publicProcedure
.input(
z.object({
diff --git a/apps/dokploy/server/api/routers/backup.ts b/apps/dokploy/server/api/routers/backup.ts
index 0b8d7ab15..8a7a5f22f 100644
--- a/apps/dokploy/server/api/routers/backup.ts
+++ b/apps/dokploy/server/api/routers/backup.ts
@@ -30,7 +30,7 @@ import { TRPCError } from "@trpc/server";
export const backupRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateBackup)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
const newBackup = await createBackup(input);
@@ -74,16 +74,14 @@ export const backupRouter = createTRPCRouter({
});
}
}),
- one: protectedProcedure
- .input(apiFindOneBackup)
- .query(async ({ input, ctx }) => {
- const backup = await findBackupById(input.backupId);
+ one: protectedProcedure.input(apiFindOneBackup).query(async ({ input }) => {
+ const backup = await findBackupById(input.backupId);
- return backup;
- }),
+ return backup;
+ }),
update: protectedProcedure
.input(apiUpdateBackup)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
await updateBackupById(input.backupId, input);
const backup = await findBackupById(input.backupId);
@@ -111,15 +109,17 @@ export const backupRouter = createTRPCRouter({
}
}
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error updating this Backup";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error updating this Backup",
+ message,
});
}
}),
remove: protectedProcedure
.input(apiRemoveBackup)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
try {
const value = await removeBackupById(input.backupId);
if (IS_CLOUD && value) {
@@ -133,10 +133,11 @@ export const backupRouter = createTRPCRouter({
}
return value;
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error deleting this Backup";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error deleting this Backup",
- cause: error,
+ message,
});
}
}),
@@ -149,11 +150,13 @@ export const backupRouter = createTRPCRouter({
await runPostgresBackup(postgres, backup);
return true;
} catch (error) {
- console.log(error);
+ const message =
+ error instanceof Error
+ ? error.message
+ : "Error running manual Postgres backup ";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error running manual Postgres backup ",
- cause: error,
+ message,
});
}
}),
diff --git a/apps/dokploy/server/api/routers/cluster.ts b/apps/dokploy/server/api/routers/cluster.ts
index 7ded632c6..0d8407576 100644
--- a/apps/dokploy/server/api/routers/cluster.ts
+++ b/apps/dokploy/server/api/routers/cluster.ts
@@ -40,7 +40,7 @@ export const clusterRouter = createTRPCRouter({
});
}
}),
- addWorker: protectedProcedure.query(async ({ input }) => {
+ addWorker: protectedProcedure.query(async () => {
if (IS_CLOUD) {
return {
command: "",
@@ -57,7 +57,7 @@ export const clusterRouter = createTRPCRouter({
version: docker_version.Version,
};
}),
- addManager: protectedProcedure.query(async ({ input }) => {
+ addManager: protectedProcedure.query(async () => {
if (IS_CLOUD) {
return {
command: "",
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index 258a03d4b..bae926d05 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -61,7 +61,12 @@ export const composeRouter = createTRPCRouter({
.mutation(async ({ ctx, input }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -97,7 +102,12 @@ export const composeRouter = createTRPCRouter({
.input(apiFindCompose)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.composeId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.composeId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const compose = await findComposeById(input.composeId);
@@ -126,7 +136,12 @@ export const composeRouter = createTRPCRouter({
.input(apiDeleteCompose)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.composeId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.composeId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const composeResult = await findComposeById(input.composeId);
@@ -155,7 +170,7 @@ export const composeRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return result[0];
@@ -385,7 +400,12 @@ export const composeRouter = createTRPCRouter({
.input(apiCreateComposeByTemplate)
.mutation(async ({ ctx, input }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -476,7 +496,7 @@ export const composeRouter = createTRPCRouter({
return templatesData;
}),
- getTags: protectedProcedure.query(async ({ input }) => {
+ getTags: protectedProcedure.query(async () => {
const allTags = templates.flatMap((template) => template.tags);
const uniqueTags = _.uniq(allTags);
return uniqueTags;
diff --git a/apps/dokploy/server/api/routers/git-provider.ts b/apps/dokploy/server/api/routers/git-provider.ts
index 39194ed31..ed37869d5 100644
--- a/apps/dokploy/server/api/routers/git-provider.ts
+++ b/apps/dokploy/server/api/routers/git-provider.ts
@@ -31,9 +31,13 @@ export const gitProviderRouter = createTRPCRouter({
}
return await removeGitProvider(input.gitProviderId);
} catch (error) {
+ const message =
+ error instanceof Error
+ ? error.message
+ : "Error deleting this Git provider";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error deleting this Git provider",
+ message,
});
}
}),
diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts
index 5735620e7..be0ffd39a 100644
--- a/apps/dokploy/server/api/routers/mariadb.ts
+++ b/apps/dokploy/server/api/routers/mariadb.ts
@@ -20,7 +20,6 @@ import {
findBackupsByDbId,
findMariadbById,
findProjectById,
- findServerById,
removeMariadbById,
removeService,
startService,
@@ -38,7 +37,12 @@ export const mariadbRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -84,7 +88,12 @@ export const mariadbRouter = createTRPCRouter({
.input(apiFindOneMariaDB)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mariadbId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mariadbId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const mariadb = await findMariadbById(input.mariadbId);
if (mariadb.project.organizationId !== ctx.session.activeOrganizationId) {
@@ -206,7 +215,12 @@ export const mariadbRouter = createTRPCRouter({
.input(apiFindOneMariaDB)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mariadbId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mariadbId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const mongo = await findMariadbById(input.mariadbId);
@@ -227,7 +241,7 @@ export const mariadbRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return mongo;
diff --git a/apps/dokploy/server/api/routers/mongo.ts b/apps/dokploy/server/api/routers/mongo.ts
index 7f8716a59..1c3ba6bb7 100644
--- a/apps/dokploy/server/api/routers/mongo.ts
+++ b/apps/dokploy/server/api/routers/mongo.ts
@@ -37,7 +37,12 @@ export const mongoRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -87,7 +92,12 @@ export const mongoRouter = createTRPCRouter({
.input(apiFindOneMongo)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mongoId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mongoId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const mongo = await findMongoById(input.mongoId);
@@ -247,7 +257,12 @@ export const mongoRouter = createTRPCRouter({
.input(apiFindOneMongo)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mongoId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mongoId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const mongo = await findMongoById(input.mongoId);
@@ -269,7 +284,7 @@ export const mongoRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return mongo;
diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts
index 96ea4846f..594403f24 100644
--- a/apps/dokploy/server/api/routers/mysql.ts
+++ b/apps/dokploy/server/api/routers/mysql.ts
@@ -39,7 +39,12 @@ export const mysqlRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -90,7 +95,12 @@ export const mysqlRouter = createTRPCRouter({
.input(apiFindOneMySql)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mysqlId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mysqlId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const mysql = await findMySqlById(input.mysqlId);
if (mysql.project.organizationId !== ctx.session.activeOrganizationId) {
@@ -245,7 +255,12 @@ export const mysqlRouter = createTRPCRouter({
.input(apiFindOneMySql)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.mysqlId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.mysqlId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const mongo = await findMySqlById(input.mysqlId);
if (mongo.project.organizationId !== ctx.session.activeOrganizationId) {
@@ -265,7 +280,7 @@ export const mysqlRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return mongo;
diff --git a/apps/dokploy/server/api/routers/notification.ts b/apps/dokploy/server/api/routers/notification.ts
index 6a893d363..48ef50b9d 100644
--- a/apps/dokploy/server/api/routers/notification.ts
+++ b/apps/dokploy/server/api/routers/notification.ts
@@ -297,9 +297,13 @@ export const notificationRouter = createTRPCRouter({
}
return await removeNotificationById(input.notificationId);
} catch (error) {
+ const message =
+ error instanceof Error
+ ? error.message
+ : "Error deleting this notification";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error deleting this notification",
+ message,
});
}
}),
diff --git a/apps/dokploy/server/api/routers/organization.ts b/apps/dokploy/server/api/routers/organization.ts
index ad77b85cc..b98fc26c4 100644
--- a/apps/dokploy/server/api/routers/organization.ts
+++ b/apps/dokploy/server/api/routers/organization.ts
@@ -71,7 +71,7 @@ export const organizationRouter = createTRPCRouter({
organizationId: z.string(),
}),
)
- .query(async ({ ctx, input }) => {
+ .query(async ({ input }) => {
return await db.query.organization.findFirst({
where: eq(organization.id, input.organizationId),
});
@@ -140,12 +140,4 @@ export const organizationRouter = createTRPCRouter({
orderBy: [desc(invitation.status), desc(invitation.expiresAt)],
});
}),
- acceptInvitation: adminProcedure
- .input(z.object({ invitationId: z.string() }))
- .mutation(async ({ ctx, input }) => {
- // const result = await auth.api.acceptInvitation({
- // invitationId: input.invitationId,
- // });
- // return result;
- }),
});
diff --git a/apps/dokploy/server/api/routers/port.ts b/apps/dokploy/server/api/routers/port.ts
index bfbc98633..923fea573 100644
--- a/apps/dokploy/server/api/routers/port.ts
+++ b/apps/dokploy/server/api/routers/port.ts
@@ -44,9 +44,11 @@ export const portRouter = createTRPCRouter({
try {
return removePortById(input.portId);
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error input: Deleting port";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error input: Deleting port",
+ message,
});
}
}),
@@ -56,9 +58,11 @@ export const portRouter = createTRPCRouter({
try {
return updatePortById(input.portId, input);
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error updating the port";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error updating the port",
+ message,
});
}
}),
diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts
index aa3a0459d..cf3221b48 100644
--- a/apps/dokploy/server/api/routers/postgres.ts
+++ b/apps/dokploy/server/api/routers/postgres.ts
@@ -1,9 +1,4 @@
-import { EventEmitter } from "node:events";
-import {
- createTRPCRouter,
- protectedProcedure,
- publicProcedure,
-} from "@/server/api/trpc";
+import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
import {
apiChangePostgresStatus,
apiCreatePostgres,
@@ -35,9 +30,6 @@ import {
} from "@dokploy/server";
import { TRPCError } from "@trpc/server";
import { observable } from "@trpc/server/observable";
-import { z } from "zod";
-
-const ee = new EventEmitter();
export const postgresRouter = createTRPCRouter({
create: protectedProcedure
@@ -45,7 +37,12 @@ export const postgresRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -95,7 +92,12 @@ export const postgresRouter = createTRPCRouter({
.input(apiFindOnePostgres)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.postgresId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.postgresId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const postgres = await findPostgresById(input.postgresId);
@@ -238,7 +240,12 @@ export const postgresRouter = createTRPCRouter({
.input(apiFindOnePostgres)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.postgresId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.postgresId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const postgres = await findPostgresById(input.postgresId);
diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts
index 68b068bc3..438a3f077 100644
--- a/apps/dokploy/server/api/routers/project.ts
+++ b/apps/dokploy/server/api/routers/project.ts
@@ -8,7 +8,6 @@ import {
applications,
compose,
mariadb,
- member,
mongo,
mysql,
postgres,
@@ -16,22 +15,20 @@ import {
redis,
} from "@/server/db/schema";
-import { TRPCError } from "@trpc/server";
-import { and, desc, eq, sql } from "drizzle-orm";
-import type { AnyPgColumn } from "drizzle-orm/pg-core";
-
import {
IS_CLOUD,
addNewProject,
checkProjectAccess,
createProject,
deleteProject,
+ findMemberById,
findProjectById,
- findUserByAuthId,
findUserById,
updateProjectById,
- findMemberById,
} from "@dokploy/server";
+import { TRPCError } from "@trpc/server";
+import { and, desc, eq, sql } from "drizzle-orm";
+import type { AnyPgColumn } from "drizzle-orm/pg-core";
export const projectRouter = createTRPCRouter({
create: protectedProcedure
.input(apiCreateProject)
diff --git a/apps/dokploy/server/api/routers/redis.ts b/apps/dokploy/server/api/routers/redis.ts
index 6d5a84d5e..a80660bf5 100644
--- a/apps/dokploy/server/api/routers/redis.ts
+++ b/apps/dokploy/server/api/routers/redis.ts
@@ -37,7 +37,12 @@ export const redisRouter = createTRPCRouter({
.mutation(async ({ input, ctx }) => {
try {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.projectId, "create");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.projectId,
+ ctx.session.activeOrganizationId,
+ "create",
+ );
}
if (IS_CLOUD && !input.serverId) {
@@ -80,7 +85,12 @@ export const redisRouter = createTRPCRouter({
.input(apiFindOneRedis)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.redisId, "access");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.redisId,
+ ctx.session.activeOrganizationId,
+ "access",
+ );
}
const redis = await findRedisById(input.redisId);
@@ -237,7 +247,12 @@ export const redisRouter = createTRPCRouter({
.input(apiFindOneRedis)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- await checkServiceAccess(ctx.user.id, input.redisId, "delete");
+ await checkServiceAccess(
+ ctx.user.id,
+ input.redisId,
+ ctx.session.activeOrganizationId,
+ "delete",
+ );
}
const redis = await findRedisById(input.redisId);
@@ -256,7 +271,7 @@ export const redisRouter = createTRPCRouter({
for (const operation of cleanupOperations) {
try {
await operation();
- } catch (error) {}
+ } catch (_) {}
}
return redis;
diff --git a/apps/dokploy/server/api/routers/registry.ts b/apps/dokploy/server/api/routers/registry.ts
index 62c8a9b65..a9a6be891 100644
--- a/apps/dokploy/server/api/routers/registry.ts
+++ b/apps/dokploy/server/api/routers/registry.ts
@@ -1,3 +1,4 @@
+import { db } from "@/server/db";
import {
apiCreateRegistry,
apiFindOneRegistry,
@@ -18,7 +19,6 @@ import {
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
-import { db } from "@/server/db";
export const registryRouter = createTRPCRouter({
create: adminProcedure
.input(apiCreateRegistry)
diff --git a/apps/dokploy/server/api/routers/server.ts b/apps/dokploy/server/api/routers/server.ts
index 1d7fd40e8..3215226e3 100644
--- a/apps/dokploy/server/api/routers/server.ts
+++ b/apps/dokploy/server/api/routers/server.ts
@@ -79,7 +79,7 @@ export const serverRouter = createTRPCRouter({
}),
getDefaultCommand: protectedProcedure
.input(apiFindOneServer)
- .query(async ({ input, ctx }) => {
+ .query(async () => {
return defaultCommand();
}),
all: protectedProcedure.query(async ({ ctx }) => {
@@ -358,7 +358,7 @@ export const serverRouter = createTRPCRouter({
throw error;
}
}),
- publicIp: protectedProcedure.query(async ({ ctx }) => {
+ publicIp: protectedProcedure.query(async () => {
if (IS_CLOUD) {
return "";
}
diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts
index ee69da22d..d2455fdb7 100644
--- a/apps/dokploy/server/api/routers/settings.ts
+++ b/apps/dokploy/server/api/routers/settings.ts
@@ -377,7 +377,10 @@ export const settingsRouter = createTRPCRouter({
.query(async ({ ctx, input }) => {
try {
if (ctx.user.rol === "member") {
- const canAccess = await canAccessToTraefikFiles(ctx.user.id);
+ const canAccess = await canAccessToTraefikFiles(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
if (!canAccess) {
throw new TRPCError({ code: "UNAUTHORIZED" });
@@ -395,7 +398,10 @@ export const settingsRouter = createTRPCRouter({
.input(apiModifyTraefikConfig)
.mutation(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- const canAccess = await canAccessToTraefikFiles(ctx.user.id);
+ const canAccess = await canAccessToTraefikFiles(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
if (!canAccess) {
throw new TRPCError({ code: "UNAUTHORIZED" });
@@ -413,7 +419,10 @@ export const settingsRouter = createTRPCRouter({
.input(apiReadTraefikConfig)
.query(async ({ input, ctx }) => {
if (ctx.user.rol === "member") {
- const canAccess = await canAccessToTraefikFiles(ctx.user.id);
+ const canAccess = await canAccessToTraefikFiles(
+ ctx.user.id,
+ ctx.session.activeOrganizationId,
+ );
if (!canAccess) {
throw new TRPCError({ code: "UNAUTHORIZED" });
@@ -708,7 +717,12 @@ export const settingsRouter = createTRPCRouter({
try {
return await checkGPUStatus(input.serverId || "");
} catch (error) {
- throw new Error("Failed to check GPU status");
+ const message =
+ error instanceof Error ? error.message : "Failed to check GPU status";
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message,
+ });
}
}),
updateTraefikPorts: adminProcedure
diff --git a/apps/dokploy/server/api/routers/ssh-key.ts b/apps/dokploy/server/api/routers/ssh-key.ts
index d55a23794..fe321de4f 100644
--- a/apps/dokploy/server/api/routers/ssh-key.ts
+++ b/apps/dokploy/server/api/routers/ssh-key.ts
@@ -9,7 +9,6 @@ import {
sshKeys,
} from "@/server/db/schema";
import {
- IS_CLOUD,
createSshKey,
findSSHKeyById,
generateSSHKey,
diff --git a/apps/dokploy/server/api/routers/stripe.ts b/apps/dokploy/server/api/routers/stripe.ts
index 540820f25..0e0e07a47 100644
--- a/apps/dokploy/server/api/routers/stripe.ts
+++ b/apps/dokploy/server/api/routers/stripe.ts
@@ -87,36 +87,34 @@ export const stripeRouter = createTRPCRouter({
return { sessionId: session.id };
}),
- createCustomerPortalSession: adminProcedure.mutation(
- async ({ ctx, input }) => {
- const user = await findUserById(ctx.user.ownerId);
+ createCustomerPortalSession: adminProcedure.mutation(async ({ ctx }) => {
+ const user = await findUserById(ctx.user.ownerId);
- if (!user.stripeCustomerId) {
- throw new TRPCError({
- code: "BAD_REQUEST",
- message: "Stripe Customer ID not found",
- });
- }
- const stripeCustomerId = user.stripeCustomerId;
+ if (!user.stripeCustomerId) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Stripe Customer ID not found",
+ });
+ }
+ const stripeCustomerId = user.stripeCustomerId;
- const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
- apiVersion: "2024-09-30.acacia",
+ const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
+ apiVersion: "2024-09-30.acacia",
+ });
+
+ try {
+ const session = await stripe.billingPortal.sessions.create({
+ customer: stripeCustomerId,
+ return_url: `${WEBSITE_URL}/dashboard/settings/billing`,
});
- try {
- const session = await stripe.billingPortal.sessions.create({
- customer: stripeCustomerId,
- return_url: `${WEBSITE_URL}/dashboard/settings/billing`,
- });
-
- return { url: session.url };
- } catch (error) {
- return {
- url: "",
- };
- }
- },
- ),
+ return { url: session.url };
+ } catch (_) {
+ return {
+ url: "",
+ };
+ }
+ }),
canCreateMoreServers: adminProcedure.query(async ({ ctx }) => {
const user = await findUserById(ctx.user.ownerId);
diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts
index 5c4eb56d5..43cffd9e1 100644
--- a/apps/dokploy/server/api/routers/user.ts
+++ b/apps/dokploy/server/api/routers/user.ts
@@ -1,17 +1,13 @@
-import { apiFindOneUser, apiFindOneUserByAuth } from "@/server/db/schema";
import {
IS_CLOUD,
findOrganizationById,
- findUserByAuthId,
findUserById,
getUserByToken,
removeUserById,
updateUser,
- verify2FA,
} from "@dokploy/server";
import { db } from "@dokploy/server/db";
import {
- account,
apiAssignPermissions,
apiFindOneToken,
apiUpdateUser,
@@ -19,7 +15,7 @@ import {
member,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { and, asc, desc, eq, gt } from "drizzle-orm";
+import { and, asc, eq, gt } from "drizzle-orm";
import { z } from "zod";
import {
adminProcedure,
@@ -93,7 +89,7 @@ export const userRouter = createTRPCRouter({
userId: z.string(),
}),
)
- .mutation(async ({ input, ctx }) => {
+ .mutation(async ({ input }) => {
if (IS_CLOUD) {
return true;
}
@@ -103,8 +99,6 @@ export const userRouter = createTRPCRouter({
.input(apiAssignPermissions)
.mutation(async ({ input, ctx }) => {
try {
- const user = await findUserById(input.id);
-
const organization = await findOrganizationById(
ctx.session?.activeOrganizationId || "",
);
diff --git a/apps/dokploy/server/db/seed.ts b/apps/dokploy/server/db/seed.ts
index b79350797..3216a44b4 100644
--- a/apps/dokploy/server/db/seed.ts
+++ b/apps/dokploy/server/db/seed.ts
@@ -1,7 +1,6 @@
import bc from "bcrypt";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
-import { users } from "./schema";
const connectionString = process.env.DATABASE_URL!;
diff --git a/apps/dokploy/server/utils/backup.ts b/apps/dokploy/server/utils/backup.ts
index 2f1419719..4fc9db931 100644
--- a/apps/dokploy/server/utils/backup.ts
+++ b/apps/dokploy/server/utils/backup.ts
@@ -2,7 +2,6 @@ import {
type BackupScheduleList,
IS_CLOUD,
removeScheduleBackup,
- scheduleBackup,
} from "@dokploy/server/index";
type QueueJob =
diff --git a/apps/dokploy/templates/excalidraw/index.ts b/apps/dokploy/templates/excalidraw/index.ts
index 13a43c440..7f73f395f 100644
--- a/apps/dokploy/templates/excalidraw/index.ts
+++ b/apps/dokploy/templates/excalidraw/index.ts
@@ -2,7 +2,6 @@ import {
type DomainSchema,
type Schema,
type Template,
- generateHash,
generateRandomDomain,
} from "../utils";
diff --git a/apps/dokploy/templates/ghost/index.ts b/apps/dokploy/templates/ghost/index.ts
index 1a88c3629..052b7c6bb 100644
--- a/apps/dokploy/templates/ghost/index.ts
+++ b/apps/dokploy/templates/ghost/index.ts
@@ -2,7 +2,6 @@ import {
type DomainSchema,
type Schema,
type Template,
- generateHash,
generateRandomDomain,
} from "../utils";
diff --git a/apps/dokploy/templates/penpot/index.ts b/apps/dokploy/templates/penpot/index.ts
index f657c698f..a3e90e8ae 100644
--- a/apps/dokploy/templates/penpot/index.ts
+++ b/apps/dokploy/templates/penpot/index.ts
@@ -2,8 +2,6 @@ import {
type DomainSchema,
type Schema,
type Template,
- generateBase64,
- generatePassword,
generateRandomDomain,
} from "../utils";
diff --git a/apps/dokploy/templates/photoprism/index.ts b/apps/dokploy/templates/photoprism/index.ts
index d20ac29c8..4a103a624 100644
--- a/apps/dokploy/templates/photoprism/index.ts
+++ b/apps/dokploy/templates/photoprism/index.ts
@@ -2,7 +2,6 @@ import {
type DomainSchema,
type Schema,
type Template,
- generateHash,
generatePassword,
generateRandomDomain,
} from "../utils";
diff --git a/apps/dokploy/templates/triggerdotdev/index.ts b/apps/dokploy/templates/triggerdotdev/index.ts
index 7b894acba..c11c708b5 100644
--- a/apps/dokploy/templates/triggerdotdev/index.ts
+++ b/apps/dokploy/templates/triggerdotdev/index.ts
@@ -1,4 +1,3 @@
-import { Secrets } from "@/components/ui/secrets";
import {
type DomainSchema,
type Schema,
diff --git a/apps/dokploy/templates/unsend/index.ts b/apps/dokploy/templates/unsend/index.ts
index 1c4c9c715..dcc80f66e 100644
--- a/apps/dokploy/templates/unsend/index.ts
+++ b/apps/dokploy/templates/unsend/index.ts
@@ -3,7 +3,6 @@ import {
type Schema,
type Template,
generateBase64,
- generateHash,
generateRandomDomain,
} from "../utils";
diff --git a/biome.json b/biome.json
index f5a6c2328..cf677ec40 100644
--- a/biome.json
+++ b/biome.json
@@ -24,7 +24,10 @@
},
"correctness": {
"useExhaustiveDependencies": "off",
- "noUnsafeOptionalChaining": "off"
+ "noUnsafeOptionalChaining": "off",
+ "noUnusedImports": "error",
+ "noUnusedFunctionParameters": "error",
+ "noUnusedVariables": "error"
},
"style": {
"noNonNullAssertion": "off"
diff --git a/packages/server/auth-schema.ts b/packages/server/auth-schema.ts
index de0f4bbb4..a7be9b051 100644
--- a/packages/server/auth-schema.ts
+++ b/packages/server/auth-schema.ts
@@ -1,10 +1,4 @@
-import {
- pgTable,
- text,
- integer,
- timestamp,
- boolean,
-} from "drizzle-orm/pg-core";
+import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
export const users_temp = pgTable("users_temp", {
id: text("id").primaryKey(),
diff --git a/packages/server/src/db/schema/user.ts b/packages/server/src/db/schema/user.ts
index 67a247414..2f3761fec 100644
--- a/packages/server/src/db/schema/user.ts
+++ b/packages/server/src/db/schema/user.ts
@@ -1,4 +1,4 @@
-import { relations, sql } from "drizzle-orm";
+import { relations } from "drizzle-orm";
import {
boolean,
integer,
diff --git a/packages/server/src/emails/emails/build-failed.tsx b/packages/server/src/emails/emails/build-failed.tsx
index b3d999192..79e7b718d 100644
--- a/packages/server/src/emails/emails/build-failed.tsx
+++ b/packages/server/src/emails/emails/build-failed.tsx
@@ -12,7 +12,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
export type TemplateProps = {
projectName: string;
diff --git a/packages/server/src/emails/emails/build-success.tsx b/packages/server/src/emails/emails/build-success.tsx
index eadf7c44b..d9e500ab9 100644
--- a/packages/server/src/emails/emails/build-success.tsx
+++ b/packages/server/src/emails/emails/build-success.tsx
@@ -12,7 +12,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
export type TemplateProps = {
projectName: string;
diff --git a/packages/server/src/emails/emails/database-backup.tsx b/packages/server/src/emails/emails/database-backup.tsx
index 2bdf944c3..754d4d982 100644
--- a/packages/server/src/emails/emails/database-backup.tsx
+++ b/packages/server/src/emails/emails/database-backup.tsx
@@ -10,7 +10,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
export type TemplateProps = {
projectName: string;
diff --git a/packages/server/src/emails/emails/docker-cleanup.tsx b/packages/server/src/emails/emails/docker-cleanup.tsx
index 05d93ed75..985406ae0 100644
--- a/packages/server/src/emails/emails/docker-cleanup.tsx
+++ b/packages/server/src/emails/emails/docker-cleanup.tsx
@@ -1,6 +1,5 @@
import {
Body,
- Button,
Container,
Head,
Heading,
@@ -11,7 +10,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
export type TemplateProps = {
message: string;
diff --git a/packages/server/src/emails/emails/dokploy-restart.tsx b/packages/server/src/emails/emails/dokploy-restart.tsx
index 1ad3d6004..db4edd69c 100644
--- a/packages/server/src/emails/emails/dokploy-restart.tsx
+++ b/packages/server/src/emails/emails/dokploy-restart.tsx
@@ -10,7 +10,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
export type TemplateProps = {
date: string;
diff --git a/packages/server/src/emails/emails/notion-magic-link.tsx b/packages/server/src/emails/emails/notion-magic-link.tsx
index b2286c340..f4071ce00 100644
--- a/packages/server/src/emails/emails/notion-magic-link.tsx
+++ b/packages/server/src/emails/emails/notion-magic-link.tsx
@@ -9,7 +9,6 @@ import {
Preview,
Text,
} from "@react-email/components";
-import * as React from "react";
interface NotionMagicLinkEmailProps {
loginCode?: string;
diff --git a/packages/server/src/emails/emails/plaid-verify-identity.tsx b/packages/server/src/emails/emails/plaid-verify-identity.tsx
index 650ab4866..88cf893d7 100644
--- a/packages/server/src/emails/emails/plaid-verify-identity.tsx
+++ b/packages/server/src/emails/emails/plaid-verify-identity.tsx
@@ -9,7 +9,6 @@ import {
Section,
Text,
} from "@react-email/components";
-import * as React from "react";
interface PlaidVerifyIdentityEmailProps {
validationCode?: string;
diff --git a/packages/server/src/emails/emails/stripe-welcome.tsx b/packages/server/src/emails/emails/stripe-welcome.tsx
index 9377853be..dbf02ea0e 100644
--- a/packages/server/src/emails/emails/stripe-welcome.tsx
+++ b/packages/server/src/emails/emails/stripe-welcome.tsx
@@ -11,7 +11,6 @@ import {
Section,
Text,
} from "@react-email/components";
-import * as React from "react";
const baseUrl = process.env.VERCEL_URL!;
diff --git a/packages/server/src/emails/emails/vercel-invite-user.tsx b/packages/server/src/emails/emails/vercel-invite-user.tsx
index 53b31987c..79f50cd71 100644
--- a/packages/server/src/emails/emails/vercel-invite-user.tsx
+++ b/packages/server/src/emails/emails/vercel-invite-user.tsx
@@ -15,7 +15,6 @@ import {
Tailwind,
Text,
} from "@react-email/components";
-import * as React from "react";
interface VercelInviteUserEmailProps {
username?: string;
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index 554b4c124..f74b8d9d0 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -1,5 +1,4 @@
export * from "./auth/random-password";
-// export * from "./db";
export * from "./services/admin";
export * from "./services/user";
export * from "./services/project";
@@ -28,7 +27,6 @@ export * from "./services/ssh-key";
export * from "./services/git-provider";
export * from "./services/bitbucket";
export * from "./services/github";
-export * from "./services/auth";
export * from "./services/gitlab";
export * from "./services/server";
export * from "./services/application";
diff --git a/packages/server/src/lib/auth.ts b/packages/server/src/lib/auth.ts
index 368b43c99..a8d75637b 100644
--- a/packages/server/src/lib/auth.ts
+++ b/packages/server/src/lib/auth.ts
@@ -10,7 +10,6 @@ import {
import { and, desc, eq } from "drizzle-orm";
import { db } from "../db";
import * as schema from "../db/schema";
-import { ac } from "./permissions";
export const auth = betterAuth({
database: drizzleAdapter(db, {
diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts
index 07c537dea..1e2b569f4 100644
--- a/packages/server/src/services/admin.ts
+++ b/packages/server/src/services/admin.ts
@@ -1,7 +1,5 @@
-import { randomBytes } from "node:crypto";
import { db } from "@dokploy/server/db";
import {
- account,
type apiCreateUserInvitation,
invitation,
member,
@@ -9,7 +7,6 @@ import {
users_temp,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import * as bcrypt from "bcrypt";
import { eq } from "drizzle-orm";
import { IS_CLOUD } from "../constants";
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index ddc3a4504..425a6adbc 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -4,7 +4,6 @@ import {
type apiCreateApplication,
applications,
buildAppName,
- cleanAppName,
} from "@dokploy/server/db/schema";
import { getAdvancedStats } from "@dokploy/server/monitoring/utils";
import {
@@ -28,7 +27,6 @@ import {
getCustomGitCloneCommand,
} from "@dokploy/server/utils/providers/git";
import {
- authGithub,
cloneGithubRepository,
getGithubCloneCommand,
} from "@dokploy/server/utils/providers/github";
@@ -40,7 +38,7 @@ import { createTraefikConfig } from "@dokploy/server/utils/traefik/application";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { encodeBase64 } from "../utils/docker/utils";
-import { findAdminById, findUserById, getDokployUrl } from "./admin";
+import { getDokployUrl } from "./admin";
import {
createDeployment,
createDeploymentPreview,
@@ -58,7 +56,6 @@ import {
updatePreviewDeployment,
} from "./preview-deployment";
import { validUniqueServerAppName } from "./project";
-import { cleanupFullDocker } from "./settings";
export type Application = typeof applications.$inferSelect;
export const createApplication = async (
diff --git a/packages/server/src/services/auth.ts b/packages/server/src/services/auth.ts
deleted file mode 100644
index 5a7484eb9..000000000
--- a/packages/server/src/services/auth.ts
+++ /dev/null
@@ -1,212 +0,0 @@
-import { randomBytes } from "node:crypto";
-import { createOTP } from "@better-auth/utils/otp";
-import { db } from "@dokploy/server/db";
-import { users_temp } from "@dokploy/server/db/schema";
-import { getPublicIpWithFallback } from "@dokploy/server/wss/utils";
-import { TRPCError } from "@trpc/server";
-import * as bcrypt from "bcrypt";
-import { eq } from "drizzle-orm";
-import encode from "hi-base32";
-import { TOTP } from "otpauth";
-import QRCode from "qrcode";
-import { IS_CLOUD } from "../constants";
-import { findUserById } from "./admin";
-import type { User } from "./user";
-
-export const findAuthById = async (authId: string) => {
- const result = await db.query.users_temp.findFirst({
- where: eq(users_temp.id, authId),
- columns: {
- createdAt: false,
- updatedAt: false,
- },
- });
- if (!result) {
- throw new TRPCError({
- code: "NOT_FOUND",
- message: "Auth not found",
- });
- }
- return result;
-};
-
-const generateBase32Secret = () => {
- // Generamos 32 bytes (256 bits) para asegurar que tengamos suficiente longitud
- const buffer = randomBytes(32);
- // Convertimos directamente a hex para Better Auth
- const hex = buffer.toString("hex");
- // También necesitamos la versión base32 para el QR code
- const base32 = encode.encode(buffer).replace(/=/g, "").substring(0, 32);
- return {
- hex,
- base32,
- };
-};
-
-export const generate2FASecret = () => {
- const secret = "46JMUCG4NJ3CIU6LQAIVFWUW";
-
- const totp = new TOTP({
- issuer: "Dokploy",
- label: "siumauricio@hotmail.com",
- algorithm: "SHA1",
- digits: 6,
- secret: secret,
- });
-
- // Convertir los bytes del secreto a hex
- const secretBytes = totp.secret.bytes;
- const hexSecret = Buffer.from(secretBytes).toString("hex");
-
- console.log("Secret bytes:", secretBytes);
- console.log("Hex secret:", hexSecret);
-
- return {
- secret,
- hexSecret,
- totp,
- };
-};
-
-export const verify2FA = async (auth: User, secret: string, pin: string) => {
- const totp = new TOTP({
- issuer: "Dokploy",
- label: `${auth?.email}`,
- algorithm: "SHA1",
- digits: 6,
- secret: secret,
- period: 30,
- });
-
- const delta = totp.validate({ token: pin });
-
- if (delta === null) {
- throw new TRPCError({
- code: "BAD_REQUEST",
- message: "Invalid 2FA code",
- });
- }
- return auth;
-};
-
-const convertBase32ToHex = (base32Secret: string) => {
- try {
- // Asegurarnos de que la longitud sea múltiplo de 8 agregando padding
- let paddedSecret = base32Secret;
- while (paddedSecret.length % 8 !== 0) {
- paddedSecret += "=";
- }
-
- const bytes = encode.decode.asBytes(paddedSecret.toUpperCase());
- let hex = Buffer.from(bytes).toString("hex");
-
- // Asegurarnos de que el hex tenga al menos 32 caracteres (16 bytes)
- while (hex.length < 32) {
- hex += "0";
- }
-
- return hex;
- } catch (error) {
- console.error("Error converting base32 to hex:", error);
- return base32Secret;
- }
-};
-
-// Para probar
-// const testSecret = "46JMUCG4NJ3CIU6LQAIVFWUW";
-// console.log("Original:", testSecret);
-// console.log("Converted:", convertBase32ToHex(testSecret));
-// console.log(
-// "Length in bytes:",
-// Buffer.from(convertBase32ToHex(testSecret), "hex").length,
-// );
-// console.log(generate2FASecret().secret.secret);
-
-// // Para probar
-// const testResult = generate2FASecret();
-// console.log("\nResultados:");
-// console.log("Original base32:", testResult.secret);
-// console.log("Hex convertido:", testResult.hexSecret);
-// console.log(
-// "Longitud en bytes:",
-// Buffer.from(testResult.hexSecret, "hex").length,
-// );
-export const symmetricDecrypt = async ({ key, data }) => {
- const keyAsBytes = await createHash("SHA-256").digest(key);
- const dataAsBytes = hexToBytes(data);
- const chacha = managedNonce(xchacha20poly1305)(new Uint8Array(keyAsBytes));
- return new TextDecoder().decode(chacha.decrypt(dataAsBytes));
-};
-// export const migrateExistingSecret = async (
-// existingBase32Secret: string,
-// encryptionKey: string,
-// ) => {
-// try {
-// // 1. Primero asegurarnos que el secreto base32 tenga el padding correcto
-// let paddedSecret = existingBase32Secret;
-// while (paddedSecret.length % 8 !== 0) {
-// paddedSecret += "=";
-// }
-
-// // 2. Decodificar el base32 a bytes usando hi-base32
-// const bytes = encode.decode.asBytes(paddedSecret.toUpperCase());
-
-// // 3. Convertir los bytes a hex
-// const hexSecret = Buffer.from(bytes).toString("hex");
-
-// // 4. Encriptar el secreto hex usando Better Auth
-// const encryptedSecret = await symmetricEncrypt({
-// key: encryptionKey,
-// data: hexSecret,
-// });
-
-// // 5. Crear TOTP con el secreto original para validación
-// const originalTotp = new TOTP({
-// issuer: "Dokploy",
-// label: "migration-test",
-// algorithm: "SHA1",
-// digits: 6,
-// secret: existingBase32Secret,
-// });
-
-// // 6. Generar un código de prueba con el secreto original
-// const testCode = originalTotp.generate();
-
-// // 7. Validar que el código funcione con el secreto original
-// const isValid = originalTotp.validate({ token: testCode }) !== null;
-
-// return {
-// originalSecret: existingBase32Secret,
-// hexSecret,
-// encryptedSecret, // Este es el valor que debes guardar en la base de datos
-// isValid,
-// testCode,
-// secretLength: hexSecret.length,
-// };
-// } catch (error: unknown) {
-// const errorMessage =
-// error instanceof Error ? error.message : "Unknown error";
-// console.error("Error durante la migración:", errorMessage);
-// throw new Error(`Error al migrar el secreto: ${errorMessage}`);
-// }
-// };
-
-// // // Ejemplo de uso con el secreto de prueba
-// // const testMigration = await migrateExistingSecret(
-// // "46JMUCG4NJ3CIU6LQAIVFWUW",
-// // process.env.BETTER_AUTH_SECRET || "your-encryption-key",
-// // );
-// // console.log("\nPrueba de migración:");
-// // console.log("Secreto original (base32):", testMigration.originalSecret);
-// // console.log("Secreto convertido (hex):", testMigration.hexSecret);
-// // console.log("Secreto encriptado:", testMigration.encryptedSecret);
-// // console.log("Longitud del secreto hex:", testMigration.secretLength);
-// // console.log("¿Conversión válida?:", testMigration.isValid);
-// // console.log("Código de prueba:", testMigration.testCode);
-// const secret = "46JMUCG4NJ3CIU6LQAIVFWUW";
-// const isValid = createOTP(secret, {
-// digits: 6,
-// period: 30,
-// }).verify("123456");
-
-// console.log(isValid.then((isValid) => console.log(isValid)));
diff --git a/packages/server/src/services/backup.ts b/packages/server/src/services/backup.ts
index ef3d04467..327057869 100644
--- a/packages/server/src/services/backup.ts
+++ b/packages/server/src/services/backup.ts
@@ -2,8 +2,6 @@ import { db } from "@dokploy/server/db";
import { type apiCreateBackup, backups } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
-import { IS_CLOUD } from "../constants";
-import { removeScheduleBackup, scheduleBackup } from "../utils/backups/utils";
export type Backup = typeof backups.$inferSelect;
diff --git a/packages/server/src/services/compose.ts b/packages/server/src/services/compose.ts
index 70bc411c1..a3ebc26ce 100644
--- a/packages/server/src/services/compose.ts
+++ b/packages/server/src/services/compose.ts
@@ -44,10 +44,9 @@ import {
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { encodeBase64 } from "../utils/docker/utils";
-import { findAdminById, findUserById, getDokployUrl } from "./admin";
+import { getDokployUrl } from "./admin";
import { createDeploymentCompose, updateDeploymentStatus } from "./deployment";
import { validUniqueServerAppName } from "./project";
-import { cleanupFullDocker } from "./settings";
export type Compose = typeof compose.$inferSelect;
diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts
index 096bdf19c..86d6c88e8 100644
--- a/packages/server/src/services/deployment.ts
+++ b/packages/server/src/services/deployment.ts
@@ -12,7 +12,7 @@ import {
import { removeDirectoryIfExistsContent } from "@dokploy/server/utils/filesystem/directory";
import { TRPCError } from "@trpc/server";
import { format } from "date-fns";
-import { and, desc, eq, isNull } from "drizzle-orm";
+import { desc, eq } from "drizzle-orm";
import {
type Application,
findApplicationById,
@@ -278,9 +278,11 @@ export const removeDeployment = async (deploymentId: string) => {
.returning();
return deployment[0];
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error creating the deployment";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error deleting this deployment",
+ message,
});
}
};
@@ -535,9 +537,11 @@ export const createServerDeployment = async (
}
return deploymentCreate[0];
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error creating the deployment";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error creating the deployment",
+ message,
});
}
};
diff --git a/packages/server/src/services/domain.ts b/packages/server/src/services/domain.ts
index 99dcde559..fe068fc22 100644
--- a/packages/server/src/services/domain.ts
+++ b/packages/server/src/services/domain.ts
@@ -4,7 +4,7 @@ import { manageDomain } from "@dokploy/server/utils/traefik/domain";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import { type apiCreateDomain, domains } from "../db/schema";
-import { findAdmin, findAdminById, findUserById } from "./admin";
+import { findUserById } from "./admin";
import { findApplicationById } from "./application";
import { findServerById } from "./server";
diff --git a/packages/server/src/services/gitlab.ts b/packages/server/src/services/gitlab.ts
index 0822aaaba..fdca2775e 100644
--- a/packages/server/src/services/gitlab.ts
+++ b/packages/server/src/services/gitlab.ts
@@ -1,9 +1,7 @@
import { db } from "@dokploy/server/db";
import {
type apiCreateGitlab,
- type bitbucket,
gitProvider,
- type github,
gitlab,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
diff --git a/packages/server/src/services/mariadb.ts b/packages/server/src/services/mariadb.ts
index 8257b5875..00be29d6a 100644
--- a/packages/server/src/services/mariadb.ts
+++ b/packages/server/src/services/mariadb.ts
@@ -4,7 +4,7 @@ import {
backups,
mariadb,
} from "@dokploy/server/db/schema";
-import { buildAppName, cleanAppName } from "@dokploy/server/db/schema";
+import { buildAppName } from "@dokploy/server/db/schema";
import { generatePassword } from "@dokploy/server/templates/utils";
import { buildMariadb } from "@dokploy/server/utils/databases/mariadb";
import { pullImage } from "@dokploy/server/utils/docker/utils";
diff --git a/packages/server/src/services/mongo.ts b/packages/server/src/services/mongo.ts
index 031a60131..0ac4cc632 100644
--- a/packages/server/src/services/mongo.ts
+++ b/packages/server/src/services/mongo.ts
@@ -1,6 +1,6 @@
import { db } from "@dokploy/server/db";
import { type apiCreateMongo, backups, mongo } from "@dokploy/server/db/schema";
-import { buildAppName, cleanAppName } from "@dokploy/server/db/schema";
+import { buildAppName } from "@dokploy/server/db/schema";
import { generatePassword } from "@dokploy/server/templates/utils";
import { buildMongo } from "@dokploy/server/utils/databases/mongo";
import { pullImage } from "@dokploy/server/utils/docker/utils";
diff --git a/packages/server/src/services/mount.ts b/packages/server/src/services/mount.ts
index 38e82d1a1..55557ea0e 100644
--- a/packages/server/src/services/mount.ts
+++ b/packages/server/src/services/mount.ts
@@ -123,8 +123,8 @@ export const updateMount = async (
mountId: string,
mountData: Partial,
) => {
- return await db.transaction(async (transaction) => {
- const mount = await db
+ return await db.transaction(async (tx) => {
+ const mount = await tx
.update(mounts)
.set({
...mountData,
diff --git a/packages/server/src/services/postgres.ts b/packages/server/src/services/postgres.ts
index 682d3f78d..75b81c506 100644
--- a/packages/server/src/services/postgres.ts
+++ b/packages/server/src/services/postgres.ts
@@ -4,7 +4,7 @@ import {
backups,
postgres,
} from "@dokploy/server/db/schema";
-import { buildAppName, cleanAppName } from "@dokploy/server/db/schema";
+import { buildAppName } from "@dokploy/server/db/schema";
import { generatePassword } from "@dokploy/server/templates/utils";
import { buildPostgres } from "@dokploy/server/utils/databases/postgres";
import { pullImage } from "@dokploy/server/utils/docker/utils";
diff --git a/packages/server/src/services/preview-deployment.ts b/packages/server/src/services/preview-deployment.ts
index d5a2149a7..775621773 100644
--- a/packages/server/src/services/preview-deployment.ts
+++ b/packages/server/src/services/preview-deployment.ts
@@ -7,19 +7,15 @@ import {
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { and, desc, eq } from "drizzle-orm";
-import { slugify } from "../setup/server-setup";
-import { generatePassword, generateRandomDomain } from "../templates/utils";
+import { generatePassword } from "../templates/utils";
import { removeService } from "../utils/docker/utils";
import { removeDirectoryCode } from "../utils/filesystem/directory";
import { authGithub } from "../utils/providers/github";
import { removeTraefikConfig } from "../utils/traefik/application";
import { manageDomain } from "../utils/traefik/domain";
-import { findAdminById, findUserById } from "./admin";
+import { findUserById } from "./admin";
import { findApplicationById } from "./application";
-import {
- removeDeployments,
- removeDeploymentsByPreviewDeploymentId,
-} from "./deployment";
+import { removeDeploymentsByPreviewDeploymentId } from "./deployment";
import { createDomain } from "./domain";
import { type Github, getIssueComment } from "./github";
@@ -111,9 +107,13 @@ export const removePreviewDeployment = async (previewDeploymentId: string) => {
}
return deployment[0];
} catch (error) {
+ const message =
+ error instanceof Error
+ ? error.message
+ : "Error deleting this preview deployment";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error deleting this preview deployment",
+ message,
});
}
};
diff --git a/packages/server/src/services/redirect.ts b/packages/server/src/services/redirect.ts
index f16dbe428..1896105fe 100644
--- a/packages/server/src/services/redirect.ts
+++ b/packages/server/src/services/redirect.ts
@@ -6,7 +6,7 @@ import {
updateRedirectMiddleware,
} from "@dokploy/server/utils/traefik/redirect";
import { TRPCError } from "@trpc/server";
-import { desc, eq } from "drizzle-orm";
+import { eq } from "drizzle-orm";
import type { z } from "zod";
import { findApplicationById } from "./application";
export type Redirect = typeof redirects.$inferSelect;
@@ -114,9 +114,11 @@ export const updateRedirectById = async (
return redirect;
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error updating this redirect";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error updating this redirect",
+ message,
});
}
};
diff --git a/packages/server/src/services/redis.ts b/packages/server/src/services/redis.ts
index e0dbbe025..9f4a1f9e6 100644
--- a/packages/server/src/services/redis.ts
+++ b/packages/server/src/services/redis.ts
@@ -1,6 +1,6 @@
import { db } from "@dokploy/server/db";
import { type apiCreateRedis, redis } from "@dokploy/server/db/schema";
-import { buildAppName, cleanAppName } from "@dokploy/server/db/schema";
+import { buildAppName } from "@dokploy/server/db/schema";
import { generatePassword } from "@dokploy/server/templates/utils";
import { buildRedis } from "@dokploy/server/utils/databases/redis";
import { pullImage } from "@dokploy/server/utils/docker/utils";
diff --git a/packages/server/src/services/registry.ts b/packages/server/src/services/registry.ts
index 853f4cf7b..6468cd970 100644
--- a/packages/server/src/services/registry.ts
+++ b/packages/server/src/services/registry.ts
@@ -112,9 +112,11 @@ export const updateRegistry = async (
return response;
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error updating this registry";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error updating this registry",
+ message,
});
}
};
diff --git a/packages/server/src/services/security.ts b/packages/server/src/services/security.ts
index 5efca19fd..d6947b887 100644
--- a/packages/server/src/services/security.ts
+++ b/packages/server/src/services/security.ts
@@ -76,9 +76,11 @@ export const deleteSecurityById = async (securityId: string) => {
await removeSecurityMiddleware(application, result);
return result;
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error removing this security";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error removing this security",
+ message,
});
}
};
@@ -98,9 +100,11 @@ export const updateSecurityById = async (
return response[0];
} catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Error updating this security";
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error updating this security",
+ message,
});
}
};
diff --git a/packages/server/src/services/server.ts b/packages/server/src/services/server.ts
index afe851ef5..a4d5c5d85 100644
--- a/packages/server/src/services/server.ts
+++ b/packages/server/src/services/server.ts
@@ -5,7 +5,7 @@ import {
server,
} from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
-import { desc, eq } from "drizzle-orm";
+import { eq } from "drizzle-orm";
export type Server = typeof server.$inferSelect;
diff --git a/packages/server/src/services/settings.ts b/packages/server/src/services/settings.ts
index 01ac43a14..75613be02 100644
--- a/packages/server/src/services/settings.ts
+++ b/packages/server/src/services/settings.ts
@@ -169,7 +169,6 @@ echo "$json_output"
const result = JSON.parse(stdout);
return result;
}
- const items = readdirSync(dirPath, { withFileTypes: true });
const stack = [dirPath];
const result: TreeDataItem[] = [];
diff --git a/packages/server/src/services/user.ts b/packages/server/src/services/user.ts
index 9e924e9f1..f36d8ef65 100644
--- a/packages/server/src/services/user.ts
+++ b/packages/server/src/services/user.ts
@@ -1,38 +1,10 @@
import { db } from "@dokploy/server/db";
-import { type users_temp, member } from "@dokploy/server/db/schema";
+import { member, type users_temp } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { and, eq } from "drizzle-orm";
-import { findUserById } from "./admin";
export type User = typeof users_temp.$inferSelect;
-// export const findUserById = async (userId: string) => {
-// // const userR = await db.query.user.findFirst({
-// // where: eq(user.userId, userId),
-// // });
-// // if (!userR) {
-// // throw new TRPCError({
-// // code: "NOT_FOUND",
-// // message: "User not found",
-// // });
-// // }
-// // return user;
-// };
-
-export const findUserByAuthId = async (authId: string) => {
- // const userR = await db.query.user.findFirst({
- // where: eq(user.id, authId),
- // with: {},
- // });
- // if (!userR) {
- // throw new TRPCError({
- // code: "NOT_FOUND",
- // message: "User not found",
- // });
- // }
- // return userR;
-};
-
export const addNewProject = async (
userId: string,
projectId: string,
diff --git a/packages/server/src/setup/monitoring-setup.ts b/packages/server/src/setup/monitoring-setup.ts
index ea6c768ba..afadb6c10 100644
--- a/packages/server/src/setup/monitoring-setup.ts
+++ b/packages/server/src/setup/monitoring-setup.ts
@@ -1,7 +1,7 @@
import { findServerById } from "@dokploy/server/services/server";
import type { ContainerCreateOptions } from "dockerode";
import { IS_CLOUD } from "../constants";
-import { findAdminById, findUserById } from "../services/admin";
+import { findUserById } from "../services/admin";
import { getDokployImageTag } from "../services/settings";
import { pullImage, pullRemoteImage } from "../utils/docker/utils";
import { execAsync, execAsyncRemote } from "../utils/process/execAsync";
diff --git a/packages/server/src/utils/access-log/handler.ts b/packages/server/src/utils/access-log/handler.ts
index 30b18ea42..5cff7f837 100644
--- a/packages/server/src/utils/access-log/handler.ts
+++ b/packages/server/src/utils/access-log/handler.ts
@@ -1,6 +1,5 @@
import { IS_CLOUD, paths } from "@dokploy/server/constants";
import { type RotatingFileStream, createStream } from "rotating-file-stream";
-import { db } from "../../db";
import { execAsync } from "../process/execAsync";
class LogRotationManager {
diff --git a/packages/server/src/utils/backups/mysql.ts b/packages/server/src/utils/backups/mysql.ts
index 009a02cf2..1272fc3ed 100644
--- a/packages/server/src/utils/backups/mysql.ts
+++ b/packages/server/src/utils/backups/mysql.ts
@@ -1,4 +1,3 @@
-import { unlink } from "node:fs/promises";
import path from "node:path";
import type { BackupSchedule } from "@dokploy/server/services/backup";
import type { MySql } from "@dokploy/server/services/mysql";
diff --git a/packages/server/src/utils/builders/compose.ts b/packages/server/src/utils/builders/compose.ts
index 838cf74e3..cbf951c73 100644
--- a/packages/server/src/utils/builders/compose.ts
+++ b/packages/server/src/utils/builders/compose.ts
@@ -2,7 +2,6 @@ import {
createWriteStream,
existsSync,
mkdirSync,
- readFileSync,
writeFileSync,
} from "node:fs";
import { dirname, join } from "node:path";
diff --git a/packages/server/src/utils/notifications/database-backup.ts b/packages/server/src/utils/notifications/database-backup.ts
index 08cff4b54..37a4a1ff2 100644
--- a/packages/server/src/utils/notifications/database-backup.ts
+++ b/packages/server/src/utils/notifications/database-backup.ts
@@ -1,4 +1,3 @@
-import { error } from "node:console";
import { db } from "@dokploy/server/db";
import { notifications } from "@dokploy/server/db/schema";
import DatabaseBackupEmail from "@dokploy/server/emails/emails/database-backup";
diff --git a/packages/server/src/utils/traefik/middleware.ts b/packages/server/src/utils/traefik/middleware.ts
index 60345f66c..934d637e1 100644
--- a/packages/server/src/utils/traefik/middleware.ts
+++ b/packages/server/src/utils/traefik/middleware.ts
@@ -95,7 +95,7 @@ export const loadRemoteMiddlewares = async (serverId: string) => {
}
const config = load(stdout) as FileConfig;
return config;
- } catch (error) {
+ } catch (_) {
throw new Error(`File not found: ${configPath}`);
}
};
From 8ab6d6b2828d27522a9a3a1243306973b1bd0ac7 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 22 Feb 2025 20:35:21 -0600
Subject: [PATCH 57/89] chore: clean up unused variables and improve error
handling across codebase
This commit focuses on removing unused variables, adding placeholder error handling, and generally tidying up various files across the Dokploy application. Changes include:
- Removing unused imports and variables
- Adding placeholder error handling in catch blocks
- Cleaning up commented-out code
- Removing deprecated utility files
- Improving type safety and code consistency
---
.../cluster/modify-swarm-settings.tsx | 2 +-
.../advanced/volumes/update-volume.tsx | 2 +-
.../generic/save-bitbucket-provider.tsx | 1 -
.../dashboard/application/general/show.tsx | 3 +-
.../show-preview-settings.tsx | 2 +-
.../dashboard/compose/delete-service.tsx | 2 +-
.../compose/domains/show-domains.tsx | 2 +-
.../compose/general/compose-file-editor.tsx | 5 +-
.../save-bitbucket-provider-compose.tsx | 1 -
.../compose/general/isolated-deployment.tsx | 2 +-
.../compose/general/randomize-compose.tsx | 4 +-
.../general/show-converted-compose.tsx | 2 +-
.../paid/container/container-block-chart.tsx | 8 --
.../organization/handle-organization.tsx | 2 +-
.../postgres/advanced/show-custom-command.tsx | 2 +-
.../dashboard/project/add-application.tsx | 2 +-
.../dashboard/project/add-template.tsx | 4 +-
.../show-external-redis-credentials.tsx | 2 +-
.../components/dashboard/requests/columns.tsx | 2 +-
.../dashboard/requests/requests-table.tsx | 4 +-
.../components/dashboard/search-command.tsx | 5 +-
.../settings/billing/show-billing.tsx | 8 +-
.../settings/cluster/nodes/show-nodes.tsx | 3 +-
.../cluster/registry/handle-registry.tsx | 2 +-
.../git/bitbucket/add-bitbucket-provider.tsx | 4 +-
.../settings/git/show-git-providers.tsx | 2 +-
.../notifications/handle-notifications.tsx | 4 +-
.../notifications/show-notifications.tsx | 2 +-
.../settings/profile/disable-2fa.tsx | 2 +-
.../dashboard/settings/profile/enable-2fa.tsx | 12 ---
.../settings/profile/profile-form.tsx | 4 +-
.../servers/actions/show-storage-actions.tsx | 2 +-
.../servers/actions/toggle-docker-cleanup.tsx | 2 +-
.../settings/servers/edit-script.tsx | 2 +-
.../settings/servers/gpu-support.tsx | 4 +-
.../settings/servers/handle-servers.tsx | 2 +-
.../settings/servers/security-audit.tsx | 2 +-
.../settings/servers/setup-monitoring.tsx | 2 +-
.../settings/servers/validate-server.tsx | 2 +-
.../servers/welcome-stripe/create-server.tsx | 6 +-
.../servers/welcome-stripe/verify.tsx | 9 --
.../settings/users/show-invitations.tsx | 4 +-
.../dashboard/settings/users/show-users.tsx | 2 +-
.../dashboard/settings/web-server.tsx | 5 +-
.../web-server/manage-traefik-ports.tsx | 2 +-
.../settings/web-server/update-server-ip.tsx | 2 +-
.../dashboard/swarm/applications/columns.tsx | 2 +-
.../swarm/applications/data-table.tsx | 2 +-
.../swarm/details/show-node-config.tsx | 2 +-
apps/dokploy/components/layouts/side.tsx | 25 ++---
.../components/layouts/update-server.tsx | 2 +-
apps/dokploy/components/layouts/user-nav.tsx | 2 +-
.../components/shared/breadcrumb-sidebar.tsx | 2 +-
.../dokploy/components/shared/drawer-logs.tsx | 2 +-
apps/dokploy/components/ui/file-tree.tsx | 2 +-
apps/dokploy/migrate.ts | 2 +-
apps/dokploy/pages/_error.tsx | 2 +-
apps/dokploy/pages/api/health.ts | 2 +-
.../pages/api/providers/github/setup.ts | 3 +-
apps/dokploy/pages/api/stripe/webhook.ts | 46 ++++++---
apps/dokploy/pages/dashboard/docker.tsx | 2 +-
apps/dokploy/pages/dashboard/monitoring.tsx | 3 +-
.../pages/dashboard/project/[projectId].tsx | 6 +-
.../services/application/[applicationId].tsx | 5 +-
.../services/compose/[composeId].tsx | 5 +-
.../services/mariadb/[mariadbId].tsx | 5 +-
.../[projectId]/services/mongo/[mongoId].tsx | 5 +-
.../[projectId]/services/mysql/[mysqlId].tsx | 5 +-
.../services/postgres/[postgresId].tsx | 5 +-
.../[projectId]/services/redis/[redisId].tsx | 5 +-
.../dashboard/settings/git-providers.tsx | 2 +-
.../pages/dashboard/settings/ssh-keys.tsx | 4 +-
apps/dokploy/pages/dashboard/swarm.tsx | 2 +-
apps/dokploy/pages/dashboard/traefik.tsx | 2 +-
apps/dokploy/pages/index.tsx | 21 ++---
apps/dokploy/pages/invitation.tsx | 15 +--
apps/dokploy/pages/register.tsx | 55 +++++------
apps/dokploy/pages/reset-password.tsx | 2 +-
apps/dokploy/pages/send-reset-password.tsx | 8 +-
apps/dokploy/server/api/routers/auth.ts | 20 ++--
apps/dokploy/server/api/routers/server.ts | 13 +++
apps/dokploy/server/api/routers/stripe.ts | 6 +-
apps/dokploy/server/db/seed.ts | 7 +-
apps/dokploy/server/utils/docker.ts | 2 +-
.../server/wss/docker-container-terminal.ts | 10 +-
apps/dokploy/server/wss/drawer-logs.ts | 2 +-
apps/dokploy/server/wss/listen-deployment.ts | 2 +-
apps/dokploy/server/wss/terminal.ts | 10 +-
apps/dokploy/templates/appsmith/index.ts | 2 +-
apps/dokploy/templates/blender/index.ts | 2 +-
apps/dokploy/templates/cloudflared/index.ts | 2 +-
apps/dokploy/templates/drawio/index.ts | 2 +-
apps/dokploy/templates/immich/index.ts | 2 +-
apps/dokploy/templates/unifi/index.ts | 2 +-
packages/server/src/db/schema/certificate.ts | 21 ++---
packages/server/src/db/schema/git-provider.ts | 2 +-
packages/server/src/db/schema/registry.ts | 2 +-
packages/server/src/lib/auth.ts | 77 ++++++++-------
packages/server/src/lib/crypto.ts | 94 -------------------
packages/server/src/lib/scrypt/index.ts | 1 -
packages/server/src/monitoring/utils.ts | 4 +-
packages/server/src/services/admin.ts | 10 +-
packages/server/src/services/docker.ts | 20 ++--
packages/server/src/services/github.ts | 2 +-
packages/server/src/services/mount.ts | 2 +-
.../server/src/services/preview-deployment.ts | 2 +-
packages/server/src/setup/monitoring-setup.ts | 4 +-
packages/server/src/setup/postgres-setup.ts | 2 +-
packages/server/src/setup/redis-setup.ts | 2 +-
packages/server/src/setup/server-audit.ts | 2 +-
packages/server/src/setup/server-validate.ts | 2 +-
packages/server/src/setup/setup.ts | 4 +-
packages/server/src/setup/traefik-setup.ts | 2 +-
packages/server/src/types/with.ts | 2 +-
.../server/src/utils/access-log/handler.ts | 2 +-
packages/server/src/utils/backups/utils.ts | 2 +-
packages/server/src/utils/builders/compose.ts | 3 +-
packages/server/src/utils/builders/index.ts | 2 +-
.../server/src/utils/builders/nixpacks.ts | 2 +-
.../server/src/utils/databases/mariadb.ts | 2 +-
packages/server/src/utils/databases/mongo.ts | 2 +-
packages/server/src/utils/databases/mysql.ts | 2 +-
packages/server/src/utils/databases/redis.ts | 2 +-
packages/server/src/utils/docker/domain.ts | 2 +-
packages/server/src/utils/docker/utils.ts | 4 +-
packages/server/src/utils/gpu-setup.ts | 4 +-
.../server/src/utils/process/execAsync.ts | 2 +-
.../server/src/utils/providers/bitbucket.ts | 1 -
packages/server/src/utils/providers/git.ts | 2 +-
packages/server/src/utils/providers/gitlab.ts | 11 +--
.../server/src/utils/traefik/application.ts | 8 +-
.../verification/send-verification-email.tsx | 49 ++++++++++
132 files changed, 375 insertions(+), 471 deletions(-)
delete mode 100644 packages/server/src/lib/crypto.ts
delete mode 100644 packages/server/src/lib/scrypt/index.ts
create mode 100644 packages/server/src/verification/send-verification-email.tsx
diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
index 9b71a042a..95a559f66 100644
--- a/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
@@ -130,7 +130,7 @@ const createStringToJSONSchema = (schema: z.ZodTypeAny) => {
}
try {
return JSON.parse(str);
- } catch (e) {
+ } catch (_e) {
ctx.addIssue({ code: "custom", message: "Invalid JSON format" });
return z.NEVER;
}
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
index 687d0f608..8da09b58b 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
@@ -77,7 +77,7 @@ export const UpdateVolume = ({
serviceType,
}: Props) => {
const [isOpen, setIsOpen] = useState(false);
- const utils = api.useUtils();
+ const _utils = api.useUtils();
const { data } = api.mounts.one.useQuery(
{
mountId,
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
index 9b207d636..9af040b79 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
@@ -84,7 +84,6 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
data: repositories,
isLoading: isLoadingRepositories,
error,
- isError,
} = api.bitbucket.getBitbucketRepositories.useQuery(
{
bitbucketId,
diff --git a/apps/dokploy/components/dashboard/application/general/show.tsx b/apps/dokploy/components/dashboard/application/general/show.tsx
index 0ea331e94..8989ca198 100644
--- a/apps/dokploy/components/dashboard/application/general/show.tsx
+++ b/apps/dokploy/components/dashboard/application/general/show.tsx
@@ -27,8 +27,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
const { mutateAsync: stop, isLoading: isStopping } =
api.application.stop.useMutation();
- const { mutateAsync: deploy, isLoading: isDeploying } =
- api.application.deploy.useMutation();
+ const { mutateAsync: deploy } = api.application.deploy.useMutation();
const { mutateAsync: reload, isLoading: isReloading } =
api.application.reload.useMutation();
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx
index fec61ca60..9d53f31d8 100644
--- a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx
@@ -279,7 +279,7 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
(
+ render={() => (
{
compose: () =>
api.compose.one.useQuery({ composeId: id }, { enabled: !!id }),
};
- const { data, refetch } = queryMap[type]
+ const { data } = queryMap[type]
? queryMap[type]()
: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });
diff --git a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx
index 7bc451e00..e6468d6fa 100644
--- a/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx
+++ b/apps/dokploy/components/dashboard/compose/domains/show-domains.tsx
@@ -118,7 +118,7 @@ export const ShowDomainsCompose = ({ composeId }: Props) => {
await deleteDomain({
domainId: item.domainId,
})
- .then((data) => {
+ .then((_data) => {
refetch();
toast.success("Domain deleted successfully");
})
diff --git a/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx b/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
index c4ce44e52..725895821 100644
--- a/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
@@ -35,8 +35,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
{ enabled: !!composeId },
);
- const { mutateAsync, isLoading, error, isError } =
- api.compose.update.useMutation();
+ const { mutateAsync, isLoading } = api.compose.update.useMutation();
const form = useForm({
defaultValues: {
@@ -76,7 +75,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
composeId,
});
})
- .catch((e) => {
+ .catch((_e) => {
toast.error("Error updating the Compose config");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
index 1c06fe881..875841338 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
@@ -84,7 +84,6 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
data: repositories,
isLoading: isLoadingRepositories,
error,
- isError,
} = api.bitbucket.getBitbucketRepositories.useQuery(
{
bitbucketId,
diff --git a/apps/dokploy/components/dashboard/compose/general/isolated-deployment.tsx b/apps/dokploy/components/dashboard/compose/general/isolated-deployment.tsx
index 70d685efb..3ae2e9fe3 100644
--- a/apps/dokploy/components/dashboard/compose/general/isolated-deployment.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/isolated-deployment.tsx
@@ -70,7 +70,7 @@ export const IsolatedDeployment = ({ composeId }: Props) => {
composeId,
isolatedDeployment: formData?.isolatedDeployment || false,
})
- .then(async (data) => {
+ .then(async (_data) => {
randomizeCompose();
refetch();
toast.success("Compose updated");
diff --git a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
index 4462ef0eb..4cc877fde 100644
--- a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
@@ -39,7 +39,7 @@ type Schema = z.infer;
export const RandomizeCompose = ({ composeId }: Props) => {
const utils = api.useUtils();
const [compose, setCompose] = useState("");
- const [isOpen, setIsOpen] = useState(false);
+ const [_isOpen, _setIsOpen] = useState(false);
const { mutateAsync, error, isError } =
api.compose.randomizeCompose.useMutation();
@@ -76,7 +76,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
suffix: formData?.suffix || "",
randomize: formData?.randomize || false,
})
- .then(async (data) => {
+ .then(async (_data) => {
randomizeCompose();
refetch();
toast.success("Compose updated");
diff --git a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
index 8a2186d9e..49606645c 100644
--- a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
@@ -40,7 +40,7 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
.then(() => {
refetch();
})
- .catch((err) => {});
+ .catch((_err) => {});
}
}, [isOpen]);
diff --git a/apps/dokploy/components/dashboard/monitoring/paid/container/container-block-chart.tsx b/apps/dokploy/components/dashboard/monitoring/paid/container/container-block-chart.tsx
index 9150dbcde..12af6b91d 100644
--- a/apps/dokploy/components/dashboard/monitoring/paid/container/container-block-chart.tsx
+++ b/apps/dokploy/components/dashboard/monitoring/paid/container/container-block-chart.tsx
@@ -29,14 +29,6 @@ interface Props {
data: ContainerMetric[];
}
-interface FormattedMetric {
- timestamp: string;
- read: number;
- write: number;
- readUnit: string;
- writeUnit: string;
-}
-
const chartConfig = {
read: {
label: "Read",
diff --git a/apps/dokploy/components/dashboard/organization/handle-organization.tsx b/apps/dokploy/components/dashboard/organization/handle-organization.tsx
index 905a244cc..2a595f436 100644
--- a/apps/dokploy/components/dashboard/organization/handle-organization.tsx
+++ b/apps/dokploy/components/dashboard/organization/handle-organization.tsx
@@ -20,7 +20,7 @@ interface Props {
organizationId?: string;
children?: React.ReactNode;
}
-export function AddOrganization({ organizationId, children }: Props) {
+export function AddOrganization({ organizationId }: Props) {
const utils = api.useUtils();
const { data: organization } = api.organization.one.useQuery(
{
diff --git a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
index 2bae245ec..40e84844f 100644
--- a/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
+++ b/apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx
@@ -53,7 +53,7 @@ export const ShowCustomCommand = ({ id, type }: Props) => {
mongo: () => api.mongo.update.useMutation(),
};
- const { mutateAsync, isLoading } = mutationMap[type]
+ const { mutateAsync } = mutationMap[type]
? mutationMap[type]()
: api.mongo.update.useMutation();
diff --git a/apps/dokploy/components/dashboard/project/add-application.tsx b/apps/dokploy/components/dashboard/project/add-application.tsx
index da30cfee3..16c56917d 100644
--- a/apps/dokploy/components/dashboard/project/add-application.tsx
+++ b/apps/dokploy/components/dashboard/project/add-application.tsx
@@ -103,7 +103,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
projectId,
});
})
- .catch((e) => {
+ .catch((_e) => {
toast.error("Error creating the service");
});
};
diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx
index 3965f8172..5363e6f36 100644
--- a/apps/dokploy/components/dashboard/project/add-template.tsx
+++ b/apps/dokploy/components/dashboard/project/add-template.tsx
@@ -434,14 +434,14 @@ export const AddTemplate = ({ projectId }: Props) => {
});
toast.promise(promise, {
loading: "Setting up...",
- success: (data) => {
+ success: (_data) => {
utils.project.one.invalidate({
projectId,
});
setOpen(false);
return `${template.name} template created successfully`;
},
- error: (err) => {
+ error: (_err) => {
return `An error ocurred deploying ${template.name} template`;
},
});
diff --git a/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx b/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
index 25b5f2ba7..75112cf6e 100644
--- a/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
+++ b/apps/dokploy/components/dashboard/redis/general/show-external-redis-credentials.tsx
@@ -79,7 +79,7 @@ export const ShowExternalRedisCredentials = ({ redisId }: Props) => {
useEffect(() => {
const buildConnectionUrl = () => {
- const hostname = window.location.hostname;
+ const _hostname = window.location.hostname;
const port = form.watch("externalPort") || data?.externalPort;
return `redis://default:${data?.databasePassword}@${getIp}:${port}`;
diff --git a/apps/dokploy/components/dashboard/requests/columns.tsx b/apps/dokploy/components/dashboard/requests/columns.tsx
index c1814190e..2c0391f80 100644
--- a/apps/dokploy/components/dashboard/requests/columns.tsx
+++ b/apps/dokploy/components/dashboard/requests/columns.tsx
@@ -24,7 +24,7 @@ export const getStatusColor = (status: number) => {
export const columns: ColumnDef[] = [
{
accessorKey: "level",
- header: ({ column }) => {
+ header: () => {
return Level;
},
cell: ({ row }) => {
diff --git a/apps/dokploy/components/dashboard/requests/requests-table.tsx b/apps/dokploy/components/dashboard/requests/requests-table.tsx
index cd2949c34..4926ce4e3 100644
--- a/apps/dokploy/components/dashboard/requests/requests-table.tsx
+++ b/apps/dokploy/components/dashboard/requests/requests-table.tsx
@@ -92,7 +92,7 @@ export const RequestsTable = () => {
pageSize: 10,
});
- const { data: statsLogs, isLoading } = api.settings.readStatsLogs.useQuery(
+ const { data: statsLogs } = api.settings.readStatsLogs.useQuery(
{
sort: sorting[0],
page: pagination,
@@ -300,7 +300,7 @@ export const RequestsTable = () => {
setSelectedRow(undefined)}
+ onOpenChange={(_open) => setSelectedRow(undefined)}
>
diff --git a/apps/dokploy/components/dashboard/search-command.tsx b/apps/dokploy/components/dashboard/search-command.tsx
index 5726dc99a..b36703036 100644
--- a/apps/dokploy/components/dashboard/search-command.tsx
+++ b/apps/dokploy/components/dashboard/search-command.tsx
@@ -22,14 +22,11 @@ import {
extractServices,
} from "@/pages/dashboard/project/[projectId]";
import { api } from "@/utils/api";
-import type { findProjectById } from "@dokploy/server/services/project";
import { BookIcon, CircuitBoard, GlobeIcon } from "lucide-react";
import { useRouter } from "next/router";
import React from "react";
import { StatusTooltip } from "../shared/status-tooltip";
-type Project = Awaited>;
-
export const SearchCommand = () => {
const router = useRouter();
const [open, setOpen] = React.useState(false);
@@ -38,7 +35,7 @@ export const SearchCommand = () => {
const { data } = api.project.all.useQuery(undefined, {
enabled: !!session,
});
- const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
+ const { data: isCloud } = api.settings.isCloud.useQuery();
React.useEffect(() => {
const down = (e: KeyboardEvent) => {
diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
index 029eaa90f..2c20bb81d 100644
--- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
+++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
@@ -38,7 +38,7 @@ export const calculatePrice = (count: number, isAnnual = false) => {
return count * 3.5;
};
export const ShowBilling = () => {
- const { data: servers } = api.server.all.useQuery(undefined);
+ const { data: servers } = api.server.count.useQuery();
const { data: admin } = api.user.get.useQuery();
const { data, isLoading } = api.stripe.getProducts.useQuery();
const { mutateAsync: createCheckoutSession } =
@@ -71,7 +71,7 @@ export const ShowBilling = () => {
});
const maxServers = admin?.user.serversQuantity ?? 1;
- const percentage = ((servers?.length ?? 0) / maxServers) * 100;
+ const percentage = ((servers ?? 0) / maxServers) * 100;
const safePercentage = Math.min(percentage, 100);
return (
@@ -102,13 +102,13 @@ export const ShowBilling = () => {
Servers Plan
- You have {servers?.length} server on your plan of{" "}
+ You have {servers} server on your plan of{" "}
{admin?.user.serversQuantity} servers
- {admin && admin.user.serversQuantity! <= servers?.length! && (
+ {admin && admin.user.serversQuantity! <= (servers ?? 0) && (
diff --git a/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx b/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
index ba3eefa56..b84c3b636 100644
--- a/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
+++ b/apps/dokploy/components/dashboard/settings/cluster/nodes/show-nodes.tsx
@@ -41,8 +41,7 @@ export const ShowNodes = () => {
const { data, isLoading, refetch } = api.cluster.getNodes.useQuery();
const { data: registry } = api.registry.all.useQuery();
- const { mutateAsync: deleteNode, isLoading: isRemoving } =
- api.cluster.removeWorker.useMutation();
+ const { mutateAsync: deleteNode } = api.cluster.removeWorker.useMutation();
const haveAtLeastOneRegistry = !!(registry && registry?.length > 0);
return (
diff --git a/apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx b/apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx
index 78f3b868a..55daedca2 100644
--- a/apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx
+++ b/apps/dokploy/components/dashboard/settings/cluster/registry/handle-registry.tsx
@@ -131,7 +131,7 @@ export const HandleRegistry = ({ registryId }: Props) => {
serverId: data.serverId,
registryId: registryId || "",
})
- .then(async (data) => {
+ .then(async (_data) => {
await utils.registry.all.invalidate();
toast.success(registryId ? "Registry updated" : "Registry added");
setIsOpen(false);
diff --git a/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx b/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
index 2c0f30466..0df2d0610 100644
--- a/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
+++ b/apps/dokploy/components/dashboard/settings/git/bitbucket/add-bitbucket-provider.tsx
@@ -47,10 +47,10 @@ type Schema = z.infer;
export const AddBitbucketProvider = () => {
const utils = api.useUtils();
const [isOpen, setIsOpen] = useState(false);
- const url = useUrl();
+ const _url = useUrl();
const { mutateAsync, error, isError } = api.bitbucket.create.useMutation();
const { data: auth } = api.user.get.useQuery();
- const router = useRouter();
+ const _router = useRouter();
const form = useForm({
defaultValues: {
username: "",
diff --git a/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx b/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx
index 3343409fe..451ea5d17 100644
--- a/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx
+++ b/apps/dokploy/components/dashboard/settings/git/show-git-providers.tsx
@@ -102,7 +102,7 @@ export const ShowGitProviders = () => {
- {data?.map((gitProvider, index) => {
+ {data?.map((gitProvider, _index) => {
const isGithub = gitProvider.providerType === "github";
const isGitlab = gitProvider.providerType === "gitlab";
const isBitbucket =
diff --git a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx
index 6f6d8ff11..d2d3b450d 100644
--- a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx
+++ b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx
@@ -136,7 +136,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
const [visible, setVisible] = useState(false);
const { data: isCloud } = api.settings.isCloud.useQuery();
- const { data: notification, refetch } = api.notification.one.useQuery(
+ const { data: notification } = api.notification.one.useQuery(
{
notificationId: notificationId || "",
},
@@ -1038,7 +1038,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
});
}
toast.success("Connection Success");
- } catch (err) {
+ } catch (_err) {
toast.error("Error testing the provider");
}
}}
diff --git a/apps/dokploy/components/dashboard/settings/notifications/show-notifications.tsx b/apps/dokploy/components/dashboard/settings/notifications/show-notifications.tsx
index d65069d4b..782b92413 100644
--- a/apps/dokploy/components/dashboard/settings/notifications/show-notifications.tsx
+++ b/apps/dokploy/components/dashboard/settings/notifications/show-notifications.tsx
@@ -56,7 +56,7 @@ export const ShowNotifications = () => {
) : (
- {data?.map((notification, index) => (
+ {data?.map((notification, _index) => (
{
toast.success("2FA disabled successfully");
utils.auth.get.invalidate();
setIsOpen(false);
- } catch (error) {
+ } catch (_error) {
form.setError("password", {
message: "Connection error. Please try again.",
});
diff --git a/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx b/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
index 918df4353..3ececb649 100644
--- a/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/enable-2fa.tsx
@@ -47,20 +47,8 @@ const PinSchema = z.object({
type PasswordForm = z.infer
;
type PinForm = z.infer;
-type TwoFactorEnableResponse = {
- totpURI: string;
- backupCodes: string[];
-};
-
-type TwoFactorSetupData = {
- qrCodeUrl: string;
- secret: string;
- totpURI: string;
-};
-
export const Enable2FA = () => {
const utils = api.useUtils();
- const { data: session } = authClient.useSession();
const [data, setData] = useState(null);
const [backupCodes, setBackupCodes] = useState([]);
const [isDialogOpen, setIsDialogOpen] = useState(false);
diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
index f4299709a..761cfb71b 100644
--- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx
@@ -54,9 +54,7 @@ const randomImages = [
];
export const ProfileForm = () => {
- const utils = api.useUtils();
- const { mutateAsync: disable2FA, isLoading: isDisabling } =
- api.auth.disable2FA.useMutation();
+ const _utils = api.useUtils();
const { data, refetch, isLoading } = api.user.get.useQuery();
const {
mutateAsync,
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
index cb60effd1..3492ba7c2 100644
--- a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx
@@ -26,7 +26,7 @@ export const ShowStorageActions = ({ serverId }: Props) => {
isLoading: cleanDockerBuilderIsLoading,
} = api.settings.cleanDockerBuilder.useMutation();
- const { mutateAsync: cleanMonitoring, isLoading: cleanMonitoringIsLoading } =
+ const { mutateAsync: cleanMonitoring } =
api.settings.cleanMonitoring.useMutation();
const {
mutateAsync: cleanUnusedImages,
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx
index e574593d5..12e279423 100644
--- a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx
@@ -36,7 +36,7 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => {
await refetch();
}
toast.success("Docker Cleanup updated");
- } catch (error) {
+ } catch (_error) {
toast.error("Docker Cleanup Error");
}
};
diff --git a/apps/dokploy/components/dashboard/settings/servers/edit-script.tsx b/apps/dokploy/components/dashboard/settings/servers/edit-script.tsx
index 0a22220ed..6225ee771 100644
--- a/apps/dokploy/components/dashboard/settings/servers/edit-script.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/edit-script.tsx
@@ -82,7 +82,7 @@ export const EditScript = ({ serverId }: Props) => {
command: formData.command || "",
serverId,
})
- .then((data) => {
+ .then((_data) => {
toast.success("Script modified successfully");
})
.catch(() => {
diff --git a/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx b/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
index ec60fed6d..c24440a61 100644
--- a/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
@@ -56,7 +56,7 @@ export function GPUSupport({ serverId }: GPUSupportProps) {
try {
await utils.settings.checkGPUStatus.invalidate({ serverId });
await refetch();
- } catch (error) {
+ } catch (_error) {
toast.error("Failed to refresh GPU status");
} finally {
setIsRefreshing(false);
@@ -74,7 +74,7 @@ export function GPUSupport({ serverId }: GPUSupportProps) {
try {
await setupGPU.mutateAsync({ serverId });
- } catch (error) {
+ } catch (_error) {
// Error handling is done in mutation's onError
}
};
diff --git a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx
index be71d8367..979941458 100644
--- a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx
@@ -118,7 +118,7 @@ export const HandleServers = ({ serverId }: Props) => {
sshKeyId: data.sshKeyId || "",
serverId: serverId || "",
})
- .then(async (data) => {
+ .then(async (_data) => {
await utils.server.all.invalidate();
refetchServer();
toast.success(serverId ? "Server Updated" : "Server Created");
diff --git a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx
index 475f2b8ff..5f693707f 100644
--- a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx
@@ -25,7 +25,7 @@ export const SecurityAudit = ({ serverId }: Props) => {
enabled: !!serverId,
},
);
- const utils = api.useUtils();
+ const _utils = api.useUtils();
return (
diff --git a/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx b/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
index 23173047e..b8c699268 100644
--- a/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/setup-monitoring.tsx
@@ -80,7 +80,7 @@ const Schema = z.object({
type Schema = z.infer
;
export const SetupMonitoring = ({ serverId }: Props) => {
- const { data, isLoading } = serverId
+ const { data } = serverId
? api.server.one.useQuery(
{
serverId: serverId || "",
diff --git a/apps/dokploy/components/dashboard/settings/servers/validate-server.tsx b/apps/dokploy/components/dashboard/settings/servers/validate-server.tsx
index db4f17b76..0632b97c2 100644
--- a/apps/dokploy/components/dashboard/settings/servers/validate-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/validate-server.tsx
@@ -25,7 +25,7 @@ export const ValidateServer = ({ serverId }: Props) => {
enabled: !!serverId,
},
);
- const utils = api.useUtils();
+ const _utils = api.useUtils();
return (
diff --git a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
index a025ad379..24d01553b 100644
--- a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
@@ -52,10 +52,10 @@ interface Props {
export const CreateServer = ({ stepper }: Props) => {
const { data: sshKeys } = api.sshKey.all.useQuery();
- const [isOpen, setIsOpen] = useState(false);
+ const [isOpen, _setIsOpen] = useState(false);
const { data: canCreateMoreServers, refetch } =
api.stripe.canCreateMoreServers.useQuery();
- const { mutateAsync, error, isError } = api.server.create.useMutation();
+ const { mutateAsync } = api.server.create.useMutation();
const cloudSSHKey = sshKeys?.find(
(sshKey) => sshKey.name === "dokploy-cloud-ssh-key",
);
@@ -96,7 +96,7 @@ export const CreateServer = ({ stepper }: Props) => {
username: data.username || "root",
sshKeyId: data.sshKeyId || "",
})
- .then(async (data) => {
+ .then(async (_data) => {
toast.success("Server Created");
stepper.next();
})
diff --git a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/verify.tsx b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/verify.tsx
index fe8c36c2c..f7c2a987c 100644
--- a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/verify.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/verify.tsx
@@ -37,15 +37,6 @@ export const Verify = () => {
);
const [isRefreshing, setIsRefreshing] = useState(false);
- const { data: server } = api.server.one.useQuery(
- {
- serverId,
- },
- {
- enabled: !!serverId,
- },
- );
-
return (
diff --git a/apps/dokploy/components/dashboard/settings/users/show-invitations.tsx b/apps/dokploy/components/dashboard/settings/users/show-invitations.tsx
index 12670c280..1bf7aa086 100644
--- a/apps/dokploy/components/dashboard/settings/users/show-invitations.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/show-invitations.tsx
@@ -143,7 +143,7 @@ export const ShowInvitations = () => {
{invitation.status === "pending" && (
{
+ onSelect={(_e) => {
copy(
`${origin}/invitation?token=${invitation.id}`,
);
@@ -159,7 +159,7 @@ export const ShowInvitations = () => {
{invitation.status === "pending" && (
{
+ onSelect={async (_e) => {
const result =
await authClient.organization.cancelInvitation(
{
diff --git a/apps/dokploy/components/dashboard/settings/users/show-users.tsx b/apps/dokploy/components/dashboard/settings/users/show-users.tsx
index ff56698e4..6847558b7 100644
--- a/apps/dokploy/components/dashboard/settings/users/show-users.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/show-users.tsx
@@ -35,7 +35,7 @@ import { AddUserPermissions } from "./add-permissions";
export const ShowUsers = () => {
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data, isLoading, refetch } = api.user.all.useQuery();
- const { mutateAsync, isLoading: isRemoving } = api.user.remove.useMutation();
+ const { mutateAsync } = api.user.remove.useMutation();
return (
diff --git a/apps/dokploy/components/dashboard/settings/web-server.tsx b/apps/dokploy/components/dashboard/settings/web-server.tsx
index 326cb0eaf..64b6d634e 100644
--- a/apps/dokploy/components/dashboard/settings/web-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server.tsx
@@ -14,10 +14,7 @@ import { ShowTraefikActions } from "./servers/actions/show-traefik-actions";
import { ToggleDockerCleanup } from "./servers/actions/toggle-docker-cleanup";
import { UpdateServer } from "./web-server/update-server";
-interface Props {
- className?: string;
-}
-export const WebServer = ({ className }: Props) => {
+export const WebServer = () => {
const { t } = useTranslation("settings");
const { data } = api.user.get.useQuery();
diff --git a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx
index a30823363..a6958b16f 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx
@@ -99,7 +99,7 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => {
});
toast.success(t("settings.server.webServer.traefik.portsUpdated"));
setOpen(false);
- } catch (error) {
+ } catch (_error) {
toast.error(t("settings.server.webServer.traefik.portsUpdateError"));
}
};
diff --git a/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx b/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
index d6e7345e1..3a511d8ea 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
@@ -43,7 +43,7 @@ interface Props {
serverId?: string;
}
-export const UpdateServerIp = ({ children, serverId }: Props) => {
+export const UpdateServerIp = ({ children }: Props) => {
const [isOpen, setIsOpen] = useState(false);
const { data } = api.user.get.useQuery();
diff --git a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
index ab058e851..5ae091a95 100644
--- a/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
+++ b/apps/dokploy/components/dashboard/swarm/applications/columns.tsx
@@ -214,7 +214,7 @@ export const columns: ColumnDef
[] = [
{
accessorKey: "Logs",
accessorFn: (row) => row.Error,
- header: ({ column }) => {
+ header: () => {
return Logs;
},
cell: ({ row }) => {
diff --git a/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx b/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx
index 03915c19b..96f43e617 100644
--- a/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx
+++ b/apps/dokploy/components/dashboard/swarm/applications/data-table.tsx
@@ -48,7 +48,7 @@ export function DataTable({
const [columnVisibility, setColumnVisibility] =
React.useState({});
const [rowSelection, setRowSelection] = React.useState({});
- const [pagination, setPagination] = React.useState({
+ const [_pagination, _setPagination] = React.useState({
pageIndex: 0, //initial page index
pageSize: 8, //default page size
});
diff --git a/apps/dokploy/components/dashboard/swarm/details/show-node-config.tsx b/apps/dokploy/components/dashboard/swarm/details/show-node-config.tsx
index a41c5a497..7f27fe3bf 100644
--- a/apps/dokploy/components/dashboard/swarm/details/show-node-config.tsx
+++ b/apps/dokploy/components/dashboard/swarm/details/show-node-config.tsx
@@ -17,7 +17,7 @@ interface Props {
}
export const ShowNodeConfig = ({ nodeId, serverId }: Props) => {
- const { data, isLoading } = api.swarm.getNodeInfo.useQuery({
+ const { data } = api.swarm.getNodeInfo.useQuery({
nodeId,
serverId,
});
diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx
index 939d10841..63155f8eb 100644
--- a/apps/dokploy/components/layouts/side.tsx
+++ b/apps/dokploy/components/layouts/side.tsx
@@ -157,7 +157,7 @@ const MENU: Menu = {
url: "/dashboard/monitoring",
icon: BarChartHorizontalBigIcon,
// Only enabled in non-cloud environments
- isEnabled: ({ auth, isCloud }) => !isCloud,
+ isEnabled: ({ isCloud }) => !isCloud,
},
{
isSingle: true,
@@ -277,7 +277,7 @@ const MENU: Menu = {
url: "/dashboard/settings/servers",
icon: Server,
// Only enabled for admins
- isEnabled: ({ auth, isCloud }) => !!(auth?.role === "owner"),
+ isEnabled: ({ auth }) => !!(auth?.role === "owner"),
},
{
isSingle: true,
@@ -490,8 +490,9 @@ function SidebarLogo() {
const { state } = useSidebar();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: user } = api.user.get.useQuery();
- const { data: dokployVersion } = api.settings.getDokployVersion.useQuery();
+ // const { data: dokployVersion } = api.settings.getDokployVersion.useQuery();
const { data: session } = authClient.useSession();
+
const {
data: organizations,
refetch,
@@ -501,12 +502,12 @@ function SidebarLogo() {
api.organization.delete.useMutation();
const { isMobile } = useSidebar();
const { data: activeOrganization } = authClient.useActiveOrganization();
- const utils = api.useUtils();
+ const _utils = api.useUtils();
const { data: invitations, refetch: refetchInvitations } =
api.user.getInvitations.useQuery();
- const [activeTeam, setActiveTeam] = useState<
+ const [_activeTeam, setActiveTeam] = useState<
typeof activeOrganization | null
>(null);
@@ -543,7 +544,7 @@ function SidebarLogo() {
- {activeOrganization?.name}
+ {activeOrganization?.name ?? "Select Organization"}
@@ -551,7 +552,7 @@ function SidebarLogo() {
+ {org.name}
- {org.name}
- {(org.ownerId === session?.user?.id || isCloud) && (
+ {org.ownerId === session?.user?.id && (
))}
- {!isCloud && user?.role === "owner" && (
+ {(user?.role === "owner" || isCloud) && (
<>
@@ -721,11 +722,11 @@ export default function Page({ children }: Props) {
const router = useRouter();
const pathname = usePathname();
- const currentPath = router.pathname;
+ const _currentPath = router.pathname;
const { data: auth } = api.user.get.useQuery();
const includesProjects = pathname?.includes("/dashboard/project");
- const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
+ const { data: isCloud } = api.settings.isCloud.useQuery();
const {
home: filteredHome,
diff --git a/apps/dokploy/components/layouts/update-server.tsx b/apps/dokploy/components/layouts/update-server.tsx
index fa748f849..5d7978859 100644
--- a/apps/dokploy/components/layouts/update-server.tsx
+++ b/apps/dokploy/components/layouts/update-server.tsx
@@ -11,7 +11,7 @@ export const UpdateServerButton = () => {
latestVersion: null,
updateAvailable: false,
});
- const router = useRouter();
+ const _router = useRouter();
const { data: isCloud } = api.settings.isCloud.useQuery();
const { mutateAsync: getUpdateData } =
api.settings.getUpdateData.useMutation();
diff --git a/apps/dokploy/components/layouts/user-nav.tsx b/apps/dokploy/components/layouts/user-nav.tsx
index 196f6d77d..4a9624de4 100644
--- a/apps/dokploy/components/layouts/user-nav.tsx
+++ b/apps/dokploy/components/layouts/user-nav.tsx
@@ -24,7 +24,7 @@ import { useRouter } from "next/router";
import { ModeToggle } from "../ui/modeToggle";
import { SidebarMenuButton } from "../ui/sidebar";
-const AUTO_CHECK_UPDATES_INTERVAL_MINUTES = 7;
+const _AUTO_CHECK_UPDATES_INTERVAL_MINUTES = 7;
export const UserNav = () => {
const router = useRouter();
diff --git a/apps/dokploy/components/shared/breadcrumb-sidebar.tsx b/apps/dokploy/components/shared/breadcrumb-sidebar.tsx
index 60730c96b..74e9fdf63 100644
--- a/apps/dokploy/components/shared/breadcrumb-sidebar.tsx
+++ b/apps/dokploy/components/shared/breadcrumb-sidebar.tsx
@@ -26,7 +26,7 @@ export const BreadcrumbSidebar = ({ list }: Props) => {
- {list.map((item, index) => (
+ {list.map((item, _index) => (
diff --git a/apps/dokploy/components/shared/drawer-logs.tsx b/apps/dokploy/components/shared/drawer-logs.tsx
index 5e4ab554b..d8d1affb7 100644
--- a/apps/dokploy/components/shared/drawer-logs.tsx
+++ b/apps/dokploy/components/shared/drawer-logs.tsx
@@ -43,7 +43,7 @@ export const DrawerLogs = ({ isOpen, onClose, filteredLogs }: Props) => {
return (
{
+ onOpenChange={(_open) => {
onClose();
}}
>
diff --git a/apps/dokploy/components/ui/file-tree.tsx b/apps/dokploy/components/ui/file-tree.tsx
index 9db3786e6..0f50d5089 100644
--- a/apps/dokploy/components/ui/file-tree.tsx
+++ b/apps/dokploy/components/ui/file-tree.tsx
@@ -85,7 +85,7 @@ const Tree = React.forwardRef(
return ids;
}, [data, initialSlelectedItemId]);
- const { ref: refRoot, width, height } = useResizeObserver();
+ const { ref: refRoot } = useResizeObserver();
return (
diff --git a/apps/dokploy/migrate.ts b/apps/dokploy/migrate.ts
index febd1c0e2..097459b96 100644
--- a/apps/dokploy/migrate.ts
+++ b/apps/dokploy/migrate.ts
@@ -136,7 +136,7 @@ await db
},
});
for (const project of projects) {
- const user = await db.update(schema.projects).set({
+ const _user = await db.update(schema.projects).set({
organizationId: project.user.organizations[0]?.id || "",
});
}
diff --git a/apps/dokploy/pages/_error.tsx b/apps/dokploy/pages/_error.tsx
index 958e17407..d28e2cb00 100644
--- a/apps/dokploy/pages/_error.tsx
+++ b/apps/dokploy/pages/_error.tsx
@@ -90,7 +90,7 @@ export default function Custom404({ statusCode, error }: Props) {
}
// @ts-ignore
-Error.getInitialProps = ({ res, err, ...rest }: NextPageContext) => {
+Error.getInitialProps = ({ res, err }: NextPageContext) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
return { statusCode, error: err };
};
diff --git a/apps/dokploy/pages/api/health.ts b/apps/dokploy/pages/api/health.ts
index 9dc8101e5..57875a192 100644
--- a/apps/dokploy/pages/api/health.ts
+++ b/apps/dokploy/pages/api/health.ts
@@ -1,7 +1,7 @@
import type { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
- req: NextApiRequest,
+ _req: NextApiRequest,
res: NextApiResponse,
) {
return res.status(200).json({ ok: true });
diff --git a/apps/dokploy/pages/api/providers/github/setup.ts b/apps/dokploy/pages/api/providers/github/setup.ts
index ac5e7a6b0..327122509 100644
--- a/apps/dokploy/pages/api/providers/github/setup.ts
+++ b/apps/dokploy/pages/api/providers/github/setup.ts
@@ -16,8 +16,7 @@ export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
- const { code, state, installation_id, setup_action }: Query =
- req.query as Query;
+ const { code, state, installation_id }: Query = req.query as Query;
if (!code) {
return res.status(400).json({ error: "Missing code parameter" });
diff --git a/apps/dokploy/pages/api/stripe/webhook.ts b/apps/dokploy/pages/api/stripe/webhook.ts
index 6200a79ec..592803b15 100644
--- a/apps/dokploy/pages/api/stripe/webhook.ts
+++ b/apps/dokploy/pages/api/stripe/webhook.ts
@@ -1,7 +1,7 @@
import { buffer } from "node:stream/consumers";
import { db } from "@/server/db";
-import { server, users_temp } from "@/server/db/schema";
-import { findUserById } from "@dokploy/server";
+import { organization, server, users_temp } from "@/server/db/schema";
+import { findUserById, type Server } from "@dokploy/server";
import { asc, eq } from "drizzle-orm";
import type { NextApiRequest, NextApiResponse } from "next";
import Stripe from "stripe";
@@ -172,11 +172,11 @@ export default async function handler(
}
await db
- .update(admins)
+ .update(users_temp)
.set({
serversQuantity: suscription?.items?.data?.[0]?.quantity ?? 0,
})
- .where(eq(admins.stripeCustomerId, suscription.customer as string));
+ .where(eq(users_temp.stripeCustomerId, suscription.customer as string));
const admin = await findUserByStripeCustomerId(
suscription.customer as string,
@@ -205,11 +205,13 @@ export default async function handler(
return res.status(400).send("Webhook Error: Admin not found");
}
await db
- .update(admins)
+ .update(users_temp)
.set({
serversQuantity: 0,
})
- .where(eq(admins.stripeCustomerId, newInvoice.customer as string));
+ .where(
+ eq(users_temp.stripeCustomerId, newInvoice.customer as string),
+ );
await disableServers(admin.id);
}
@@ -245,12 +247,18 @@ export default async function handler(
}
const disableServers = async (userId: string) => {
- await db
- .update(server)
- .set({
- serverStatus: "inactive",
- })
- .where(eq(server.userId, userId));
+ const organizations = await db.query.organization.findMany({
+ where: eq(organization.ownerId, userId),
+ });
+
+ for (const org of organizations) {
+ await db
+ .update(server)
+ .set({
+ serverStatus: "inactive",
+ })
+ .where(eq(server.organizationId, org.id));
+ }
};
const findUserByStripeCustomerId = async (stripeCustomerId: string) => {
@@ -275,11 +283,19 @@ const deactivateServer = async (serverId: string) => {
};
export const findServersByUserIdSorted = async (userId: string) => {
- const servers = await db.query.server.findMany({
- where: eq(server.userId, userId),
- orderBy: asc(server.createdAt),
+ const organizations = await db.query.organization.findMany({
+ where: eq(organization.ownerId, userId),
});
+ const servers: Server[] = [];
+ for (const org of organizations) {
+ const serversByOrg = await db.query.server.findMany({
+ where: eq(server.organizationId, org.id),
+ orderBy: asc(server.createdAt),
+ });
+ servers.push(...serversByOrg);
+ }
+
return servers;
};
export const updateServersBasedOnQuantity = async (
diff --git a/apps/dokploy/pages/dashboard/docker.tsx b/apps/dokploy/pages/dashboard/docker.tsx
index a9d80353f..e01a763be 100644
--- a/apps/dokploy/pages/dashboard/docker.tsx
+++ b/apps/dokploy/pages/dashboard/docker.tsx
@@ -72,7 +72,7 @@ export async function getServerSideProps(
trpcState: helpers.dehydrate(),
},
};
- } catch (error) {
+ } catch (_error) {
return {
props: {},
};
diff --git a/apps/dokploy/pages/dashboard/monitoring.tsx b/apps/dokploy/pages/dashboard/monitoring.tsx
index 4d8b072f5..4272c4536 100644
--- a/apps/dokploy/pages/dashboard/monitoring.tsx
+++ b/apps/dokploy/pages/dashboard/monitoring.tsx
@@ -15,8 +15,7 @@ const BASE_URL = "http://localhost:3001/metrics";
const DEFAULT_TOKEN = "metrics";
const Dashboard = () => {
- const { data: isCloud } = api.settings.isCloud.useQuery();
- const [toggleMonitoring, setToggleMonitoring] = useLocalStorage(
+ const [toggleMonitoring, _setToggleMonitoring] = useLocalStorage(
"monitoring-enabled",
false,
);
diff --git a/apps/dokploy/pages/dashboard/project/[projectId].tsx b/apps/dokploy/pages/dashboard/project/[projectId].tsx
index f85aa9ee8..62de98c13 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId].tsx
@@ -261,7 +261,7 @@ const Project = (
try {
await composeActions.start.mutateAsync({ composeId: serviceId });
success++;
- } catch (error) {
+ } catch (_error) {
toast.error(`Error starting service ${serviceId}`);
}
}
@@ -281,7 +281,7 @@ const Project = (
try {
await composeActions.stop.mutateAsync({ composeId: serviceId });
success++;
- } catch (error) {
+ } catch (_error) {
toast.error(`Error stopping service ${serviceId}`);
}
}
@@ -685,7 +685,7 @@ export async function getServerSideProps(
projectId: params?.projectId,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
index 59dba68ce..94b8f5f5d 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -65,7 +65,7 @@ type TabState =
const Service = (
props: InferGetServerSidePropsType
,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { applicationId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
@@ -86,7 +86,6 @@ const Service = (
const { data: isCloud } = api.settings.isCloud.useQuery();
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
return (
@@ -399,7 +398,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
index c1331e23f..46b727d2a 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -59,7 +59,7 @@ type TabState =
const Service = (
props: InferGetServerSidePropsType
,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { composeId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
@@ -79,7 +79,6 @@ const Service = (
);
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
return (
@@ -393,7 +392,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
index 033b88a9d..e91e0978d 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mariadb/[mariadbId].tsx
@@ -52,7 +52,7 @@ type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
const Mariadb = (
props: InferGetServerSidePropsType,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { mariadbId, activeTab } = props;
const router = useRouter();
@@ -60,7 +60,6 @@ const Mariadb = (
const [tab, setSab] = useState(activeTab);
const { data } = api.mariadb.one.useQuery({ mariadbId });
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
@@ -342,7 +341,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
index dea8cd57b..b10b7b93d 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mongo/[mongoId].tsx
@@ -52,7 +52,7 @@ type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
const Mongo = (
props: InferGetServerSidePropsType,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { mongoId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
@@ -60,7 +60,6 @@ const Mongo = (
const { data } = api.mongo.one.useQuery({ mongoId });
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
@@ -343,7 +342,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
index cc4eb4aa3..261a2762b 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/mysql/[mysqlId].tsx
@@ -52,14 +52,13 @@ type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
const MySql = (
props: InferGetServerSidePropsType,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { mysqlId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
const [tab, setSab] = useState(activeTab);
const { data } = api.mysql.one.useQuery({ mysqlId });
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
@@ -348,7 +347,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
index d0f1dc106..5d8fd3b1b 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/postgres/[postgresId].tsx
@@ -52,7 +52,7 @@ type TabState = "projects" | "monitoring" | "settings" | "backups" | "advanced";
const Postgresql = (
props: InferGetServerSidePropsType,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { postgresId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
@@ -60,7 +60,6 @@ const Postgresql = (
const { data } = api.postgres.one.useQuery({ postgresId });
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
return (
@@ -345,7 +344,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
index 2b053df47..c4f40281f 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/redis/[redisId].tsx
@@ -51,7 +51,7 @@ type TabState = "projects" | "monitoring" | "settings" | "advanced";
const Redis = (
props: InferGetServerSidePropsType,
) => {
- const [toggleMonitoring, setToggleMonitoring] = useState(false);
+ const [_toggleMonitoring, _setToggleMonitoring] = useState(false);
const { redisId, activeTab } = props;
const router = useRouter();
const { projectId } = router.query;
@@ -59,7 +59,6 @@ const Redis = (
const { data } = api.redis.one.useQuery({ redisId });
const { data: auth } = api.user.get.useQuery();
- const { data: monitoring } = api.user.getMetricsToken.useQuery();
const { data: isCloud } = api.settings.isCloud.useQuery();
@@ -335,7 +334,7 @@ export async function getServerSideProps(
activeTab: (activeTab || "general") as TabState,
},
};
- } catch (error) {
+ } catch (_error) {
return {
redirect: {
permanent: false,
diff --git a/apps/dokploy/pages/dashboard/settings/git-providers.tsx b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
index 4187a0ef7..ce2adc9ce 100644
--- a/apps/dokploy/pages/dashboard/settings/git-providers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/git-providers.tsx
@@ -68,7 +68,7 @@ export async function getServerSideProps(
trpcState: helpers.dehydrate(),
},
};
- } catch (error) {
+ } catch (_error) {
return {
props: {},
};
diff --git a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
index 738c647d4..2472feab4 100644
--- a/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
+++ b/apps/dokploy/pages/dashboard/settings/ssh-keys.tsx
@@ -33,7 +33,7 @@ export async function getServerSideProps(
},
};
}
- const { req, res, resolvedUrl } = ctx;
+ const { req, res } = ctx;
const helpers = createServerSideHelpers({
router: appRouter,
ctx: {
@@ -69,7 +69,7 @@ export async function getServerSideProps(
trpcState: helpers.dehydrate(),
},
};
- } catch (error) {
+ } catch (_error) {
return {
props: {},
};
diff --git a/apps/dokploy/pages/dashboard/swarm.tsx b/apps/dokploy/pages/dashboard/swarm.tsx
index c693fd8cf..155531160 100644
--- a/apps/dokploy/pages/dashboard/swarm.tsx
+++ b/apps/dokploy/pages/dashboard/swarm.tsx
@@ -72,7 +72,7 @@ export async function getServerSideProps(
trpcState: helpers.dehydrate(),
},
};
- } catch (error) {
+ } catch (_error) {
return {
props: {},
};
diff --git a/apps/dokploy/pages/dashboard/traefik.tsx b/apps/dokploy/pages/dashboard/traefik.tsx
index 90359ccd6..ce8208beb 100644
--- a/apps/dokploy/pages/dashboard/traefik.tsx
+++ b/apps/dokploy/pages/dashboard/traefik.tsx
@@ -72,7 +72,7 @@ export async function getServerSideProps(
trpcState: helpers.dehydrate(),
},
};
- } catch (error) {
+ } catch (_error) {
return {
props: {},
};
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index c910e78ec..783ec651d 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -43,18 +43,11 @@ const LoginSchema = z.object({
password: z.string().min(8),
});
-const TwoFactorSchema = z.object({
+const _TwoFactorSchema = z.object({
code: z.string().min(6),
});
-const BackupCodeSchema = z.object({
- code: z.string().min(8, {
- message: "Backup code must be at least 8 characters",
- }),
-});
-
type LoginForm = z.infer;
-type BackupCodeForm = z.infer;
interface Props {
IS_CLOUD: boolean;
@@ -101,7 +94,7 @@ export default function Home({ IS_CLOUD }: Props) {
toast.success("Logged in successfully");
router.push("/dashboard/projects");
- } catch (error) {
+ } catch (_error) {
toast.error("An error occurred while logging in");
} finally {
setIsLoginLoading(false);
@@ -117,7 +110,7 @@ export default function Home({ IS_CLOUD }: Props) {
setIsTwoFactorLoading(true);
try {
- const { data, error } = await authClient.twoFactor.verifyTotp({
+ const { error } = await authClient.twoFactor.verifyTotp({
code: twoFactorCode.replace(/\s/g, ""),
});
@@ -129,7 +122,7 @@ export default function Home({ IS_CLOUD }: Props) {
toast.success("Logged in successfully");
router.push("/dashboard/projects");
- } catch (error) {
+ } catch (_error) {
toast.error("An error occurred while verifying 2FA code");
} finally {
setIsTwoFactorLoading(false);
@@ -145,7 +138,7 @@ export default function Home({ IS_CLOUD }: Props) {
setIsBackupCodeLoading(true);
try {
- const { data, error } = await authClient.twoFactor.verifyBackupCode({
+ const { error } = await authClient.twoFactor.verifyBackupCode({
code: backupCode.trim(),
});
@@ -159,7 +152,7 @@ export default function Home({ IS_CLOUD }: Props) {
toast.success("Logged in successfully");
router.push("/dashboard/projects");
- } catch (error) {
+ } catch (_error) {
toast.error("An error occurred while verifying backup code");
} finally {
setIsBackupCodeLoading(false);
@@ -396,7 +389,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
},
};
}
- } catch (error) {}
+ } catch (_error) {}
return {
props: {
diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx
index 91ca1d0d7..813ec74cc 100644
--- a/apps/dokploy/pages/invitation.tsx
+++ b/apps/dokploy/pages/invitation.tsx
@@ -16,7 +16,6 @@ import { authClient } from "@/lib/auth-client";
import { api } from "@/utils/api";
import { IS_CLOUD, getUserByToken } from "@dokploy/server";
import { zodResolver } from "@hookform/resolvers/zod";
-import { AlertTriangle } from "lucide-react";
import type { GetServerSidePropsContext } from "next";
import Link from "next/link";
import { useRouter } from "next/router";
@@ -90,9 +89,6 @@ const Invitation = ({
},
);
- const { mutateAsync, error, isError, isSuccess } =
- api.auth.createUser.useMutation();
-
const form = useForm({
defaultValues: {
name: "",
@@ -115,7 +111,7 @@ const Invitation = ({
const onSubmit = async (values: Register) => {
try {
- const { data, error } = await authClient.signUp.email({
+ const { error } = await authClient.signUp.email({
email: values.email,
password: values.password,
name: values.name,
@@ -131,13 +127,13 @@ const Invitation = ({
return;
}
- const result = await authClient.organization.acceptInvitation({
+ const _result = await authClient.organization.acceptInvitation({
invitationId: token,
});
toast.success("Account created successfully");
router.push("/dashboard/projects");
- } catch (error) {
+ } catch (_error) {
toast.error("An error occurred while creating your account");
}
};
@@ -180,14 +176,14 @@ const Invitation = ({
- {isError && (
+ {/* {isError && (
- )}
+ )} */}