From cd8230b0e561e13f02871bb7dff95247ba11cc52 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 6 Apr 2025 11:14:43 -0600
Subject: [PATCH 01/56] refactor(add-domain): remove debug log statement from
AddDomain component
---
.../components/dashboard/application/domains/add-domain.tsx | 2 --
1 file changed, 2 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/domains/add-domain.tsx b/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
index 8da85a879..0c16fdd2f 100644
--- a/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
@@ -89,8 +89,6 @@ export const AddDomain = ({
serverId: application?.serverId || "",
});
- console.log("canGenerateTraefikMeDomains", canGenerateTraefikMeDomains);
-
const form = useForm({
resolver: zodResolver(domain),
defaultValues: {
From cad628d155b9ad9fba591bc879555df1114d95d1 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 10 May 2025 02:58:31 -0600
Subject: [PATCH 02/56] refactor: remove unused volume suffix function from
collision utility
---
packages/server/src/utils/docker/collision.ts | 2 --
1 file changed, 2 deletions(-)
diff --git a/packages/server/src/utils/docker/collision.ts b/packages/server/src/utils/docker/collision.ts
index d3f131c67..8d615b99b 100644
--- a/packages/server/src/utils/docker/collision.ts
+++ b/packages/server/src/utils/docker/collision.ts
@@ -2,7 +2,6 @@ import { findComposeById } from "@dokploy/server/services/compose";
import { dump, load } from "js-yaml";
import { addAppNameToAllServiceNames } from "./collision/root-network";
import { generateRandomHash } from "./compose";
-import { addSuffixToAllVolumes } from "./compose/volume";
import type { ComposeSpecification } from "./types";
export const addAppNameToPreventCollision = (
@@ -12,7 +11,6 @@ export const addAppNameToPreventCollision = (
let updatedComposeData = { ...composeData };
updatedComposeData = addAppNameToAllServiceNames(updatedComposeData, appName);
- updatedComposeData = addSuffixToAllVolumes(updatedComposeData, appName);
return updatedComposeData;
};
From bb904bb011e369a7e18e3080c3fbf5fa903ca214 Mon Sep 17 00:00:00 2001
From: Jhonatan Caldeira
Date: Fri, 20 Jun 2025 16:36:27 -0300
Subject: [PATCH 03/56] feat: add internal path routing and path stripping for
domains
- Add internalPath and stripPath fields to domain schema
- Implement UI controls for configuring internal path routing
- Create Traefik middleware for path manipulation (addPrefix/stripPrefix)
- Support different external and internal paths for applications
- Enable path stripping for cleaner URL forwarding
This allows applications to be accessed via external paths while maintaining
different internal routing structures, useful for microservices and legacy
applications that expect specific path prefixes.
---
.../application/domains/handle-domain.tsx | 49 +
.../dokploy/drizzle/0094_brief_silver_fox.sql | 2 +
apps/dokploy/drizzle/meta/0094_snapshot.json | 5732 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
packages/server/src/db/schema/domain.ts | 6 +
packages/server/src/services/domain.ts | 42 +
packages/server/src/utils/traefik/domain.ts | 18 +-
.../server/src/utils/traefik/middleware.ts | 94 +
8 files changed, 5949 insertions(+), 1 deletion(-)
create mode 100644 apps/dokploy/drizzle/0094_brief_silver_fox.sql
create mode 100644 apps/dokploy/drizzle/meta/0094_snapshot.json
diff --git a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
index c145afcfc..8f9c279c5 100644
--- a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
@@ -49,6 +49,8 @@ export const domain = z
.object({
host: z.string().min(1, { message: "Add a hostname" }),
path: z.string().min(1).optional(),
+ internalPath: z.string().optional(),
+ stripPath: z.boolean().optional(),
port: z
.number()
.min(1, { message: "Port must be at least 1" })
@@ -162,6 +164,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
defaultValues: {
host: "",
path: undefined,
+ internalPath: undefined,
+ stripPath: false,
port: undefined,
https: false,
certificateType: undefined,
@@ -182,6 +186,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
...data,
/* Convert null to undefined */
path: data?.path || undefined,
+ internalPath: data?.internalPath || undefined,
+ stripPath: data?.stripPath || false,
port: data?.port || undefined,
certificateType: data?.certificateType || undefined,
customCertResolver: data?.customCertResolver || undefined,
@@ -194,6 +200,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
form.reset({
host: "",
path: undefined,
+ internalPath: undefined,
+ stripPath: false,
port: undefined,
https: false,
certificateType: undefined,
@@ -469,6 +477,47 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
}}
/>
+ {
+ return (
+
+ Internal Path
+
+ The path where your application expects to receive requests internally (defaults to "/")
+
+
+
+
+
+
+ );
+ }}
+ />
+
+ (
+
+
+ Strip Path
+
+ Remove the external path from the request before forwarding to the application
+
+
+
+
+
+
+
+ )}
+ />
+
statement-breakpoint
+ALTER TABLE "domain" ADD COLUMN "stripPath" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0094_snapshot.json b/apps/dokploy/drizzle/meta/0094_snapshot.json
new file mode 100644
index 000000000..b8bbfe738
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0094_snapshot.json
@@ -0,0 +1,5732 @@
+{
+ "id": "e889e477-f997-4d54-b2f9-0e59e7050c03",
+ "prevId": "9df38a75-e90e-4dff-9f41-9152e331fb16",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 68e363044..72cd2090b 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -659,6 +659,13 @@
"when": 1750397258622,
"tag": "0093_nice_gorilla_man",
"breakpoints": true
+ },
+ {
+ "idx": 94,
+ "version": "7",
+ "when": 1750443891684,
+ "tag": "0094_brief_silver_fox",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/src/db/schema/domain.ts b/packages/server/src/db/schema/domain.ts
index 0d6c52d4b..81d56b4d2 100644
--- a/packages/server/src/db/schema/domain.ts
+++ b/packages/server/src/db/schema/domain.ts
@@ -51,6 +51,8 @@ export const domains = pgTable("domain", {
{ onDelete: "cascade" },
),
certificateType: certificateType("certificateType").notNull().default("none"),
+ internalPath: text("internalPath").default("/"),
+ stripPath: boolean("stripPath").notNull().default(false),
});
export const domainsRelations = relations(domains, ({ one }) => ({
@@ -82,6 +84,8 @@ export const apiCreateDomain = createSchema.pick({
serviceName: true,
domainType: true,
previewDeploymentId: true,
+ internalPath: true,
+ stripPath: true,
});
export const apiFindDomain = createSchema
@@ -112,5 +116,7 @@ export const apiUpdateDomain = createSchema
customCertResolver: true,
serviceName: true,
domainType: true,
+ internalPath: true,
+ stripPath: true,
})
.merge(createSchema.pick({ domainId: true }).required());
diff --git a/packages/server/src/services/domain.ts b/packages/server/src/services/domain.ts
index f81fffb96..9b77e6736 100644
--- a/packages/server/src/services/domain.ts
+++ b/packages/server/src/services/domain.ts
@@ -10,6 +10,7 @@ import { findUserById } from "./admin";
import { findApplicationById } from "./application";
import { detectCDNProvider } from "./cdn";
import { findServerById } from "./server";
+import type { ApplicationNested } from "../utils/builders";
export type Domain = typeof domains.$inferSelect;
@@ -201,3 +202,44 @@ export const validateDomain = async (
};
}
};
+
+export const createMultiPathDomain = async (
+ applicationId: string,
+ domains: Array<{
+ host: string;
+ externalPath?: string;
+ internalPath: string;
+ port?: number;
+ https?: boolean;
+ stripPath?: boolean;
+ }>
+) => {
+ const app = await findApplicationById(applicationId);
+ if (!app) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: "Application not found",
+ });
+ }
+
+ const createdDomains = [];
+
+ for (const domainConfig of domains) {
+ const domain = await createDomain({
+ applicationId,
+ host: domainConfig.host,
+ path: domainConfig.externalPath || "/",
+ internalPath: domainConfig.internalPath,
+ port: domainConfig.port || 3000,
+ https: domainConfig.https || false,
+ stripPath: domainConfig.stripPath || false,
+ serviceName: app.appName,
+ domainType: "application",
+ certificateType: domainConfig.https ? "letsencrypt" : "none",
+ });
+
+ createdDomains.push(domain);
+ }
+
+ return createdDomains;
+};
diff --git a/packages/server/src/utils/traefik/domain.ts b/packages/server/src/utils/traefik/domain.ts
index 22eb17d46..9f01c8d8a 100644
--- a/packages/server/src/utils/traefik/domain.ts
+++ b/packages/server/src/utils/traefik/domain.ts
@@ -10,6 +10,7 @@ import {
writeTraefikConfigRemote,
} from "./application";
import type { FileConfig, HttpRouter } from "./file-types";
+import { createPathMiddlewares, removePathMiddlewares } from "./middleware";
export const manageDomain = async (app: ApplicationNested, domain: Domain) => {
const { appName } = app;
@@ -46,6 +47,8 @@ export const manageDomain = async (app: ApplicationNested, domain: Domain) => {
config.http.services[serviceName] = createServiceConfig(appName, domain);
+ await createPathMiddlewares(app, domain);
+
if (app.serverId) {
await writeTraefikConfigRemote(config, appName, app.serverId);
} else {
@@ -80,6 +83,8 @@ export const removeDomain = async (
delete config.http.services[serviceKey];
}
+ await removePathMiddlewares(application, uniqueKey);
+
// verify if is the last router if so we delete the router
if (
config?.http?.routers &&
@@ -107,7 +112,7 @@ export const createRouterConfig = async (
const { appName, redirects, security } = app;
const { certificateType } = domain;
- const { host, path, https, uniqueConfigKey } = domain;
+ const { host, path, https, uniqueConfigKey, internalPath, stripPath } = domain;
const routerConfig: HttpRouter = {
rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`,
service: `${appName}-service-${uniqueConfigKey}`,
@@ -115,6 +120,17 @@ export const createRouterConfig = async (
entryPoints: [entryPoint],
};
+ // Add path rewriting middleware if needed
+ if (internalPath && internalPath !== "/" && internalPath !== path) {
+ const pathMiddleware = `addprefix-${appName}-${uniqueConfigKey}`;
+ routerConfig.middlewares?.push(pathMiddleware);
+ }
+
+ if (stripPath && path && path !== "/") {
+ const stripMiddleware = `stripprefix-${appName}-${uniqueConfigKey}`;
+ routerConfig.middlewares?.push(stripMiddleware);
+ }
+
if (entryPoint === "web" && https) {
routerConfig.middlewares = ["redirect-to-https"];
}
diff --git a/packages/server/src/utils/traefik/middleware.ts b/packages/server/src/utils/traefik/middleware.ts
index 934d637e1..0711a5034 100644
--- a/packages/server/src/utils/traefik/middleware.ts
+++ b/packages/server/src/utils/traefik/middleware.ts
@@ -105,3 +105,97 @@ export const writeMiddleware = (config: T) => {
const newYamlContent = dump(config);
writeFileSync(configPath, newYamlContent, "utf8");
};
+
+export const createPathMiddlewares = async (
+ app: ApplicationNested,
+ domain: any
+) => {
+ let config: FileConfig;
+
+ if (app.serverId) {
+ try {
+ config = await loadRemoteMiddlewares(app.serverId);
+ } catch {
+ config = { http: { middlewares: {} } };
+ }
+ } else {
+ try {
+ config = loadMiddlewares();
+ } catch {
+ config = { http: { middlewares: {} } };
+ }
+ }
+
+ const { appName } = app;
+ const { uniqueConfigKey, internalPath, stripPath, path } = domain;
+
+ if (!config.http) {
+ config.http = { middlewares: {} };
+ }
+ if (!config.http.middlewares) {
+ config.http.middlewares = {};
+ }
+
+ // Add internal path prefix middleware
+ if (internalPath && internalPath !== "/" && internalPath !== path) {
+ const middlewareName = `addprefix-${appName}-${uniqueConfigKey}`;
+ config.http.middlewares[middlewareName] = {
+ addPrefix: {
+ prefix: internalPath
+ }
+ };
+ }
+
+ // Strip external path middleware if needed
+ if (stripPath && path && path !== "/") {
+ const middlewareName = `stripprefix-${appName}-${uniqueConfigKey}`;
+ config.http.middlewares[middlewareName] = {
+ stripPrefix: {
+ prefixes: [path]
+ }
+ };
+ }
+
+ if (app.serverId) {
+ await writeTraefikConfigRemote(config, "middlewares", app.serverId);
+ } else {
+ writeMiddleware(config);
+ }
+};
+
+export const removePathMiddlewares = async (
+ app: ApplicationNested,
+ uniqueConfigKey: number
+) => {
+ let config: FileConfig;
+
+ if (app.serverId) {
+ try {
+ config = await loadRemoteMiddlewares(app.serverId);
+ } catch {
+ return;
+ }
+ } else {
+ try {
+ config = loadMiddlewares();
+ } catch {
+ return;
+ }
+ }
+
+ const { appName } = app;
+
+ if (config.http?.middlewares) {
+ const addPrefixMiddleware = `addprefix-${appName}-${uniqueConfigKey}`;
+ const stripPrefixMiddleware = `stripprefix-${appName}-${uniqueConfigKey}`;
+
+ delete config.http.middlewares[addPrefixMiddleware];
+ delete config.http.middlewares[stripPrefixMiddleware];
+ }
+
+ if (app.serverId) {
+ await writeTraefikConfigRemote(config, "middlewares", app.serverId);
+ } else {
+ writeMiddleware(config);
+ }
+};
From f2671f9369a840780ccce11943281a717b03269d Mon Sep 17 00:00:00 2001
From: Jhonatan Caldeira
Date: Fri, 20 Jun 2025 17:51:05 -0300
Subject: [PATCH 04/56] fix(domain): remove unused ApplicationNested type
import
---
packages/server/src/services/domain.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/server/src/services/domain.ts b/packages/server/src/services/domain.ts
index 9b77e6736..352eb00db 100644
--- a/packages/server/src/services/domain.ts
+++ b/packages/server/src/services/domain.ts
@@ -10,7 +10,6 @@ import { findUserById } from "./admin";
import { findApplicationById } from "./application";
import { detectCDNProvider } from "./cdn";
import { findServerById } from "./server";
-import type { ApplicationNested } from "../utils/builders";
export type Domain = typeof domains.$inferSelect;
From 4c9835d1f3bb4d929067e7c05f8b3d4ad39ab3b0 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:38:39 -0600
Subject: [PATCH 05/56] refactor(domain): remove deprecated columns
internalPath and stripPath from domain schema
- Deleted SQL statements for internalPath and stripPath columns in the domain table.
- Updated journal and snapshot metadata to reflect the removal of these columns.
---
.../dokploy/drizzle/0094_brief_silver_fox.sql | 2 -
apps/dokploy/drizzle/meta/0094_snapshot.json | 5732 -----------------
apps/dokploy/drizzle/meta/_journal.json | 7 -
3 files changed, 5741 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0094_brief_silver_fox.sql
delete mode 100644 apps/dokploy/drizzle/meta/0094_snapshot.json
diff --git a/apps/dokploy/drizzle/0094_brief_silver_fox.sql b/apps/dokploy/drizzle/0094_brief_silver_fox.sql
deleted file mode 100644
index 2ba7289fb..000000000
--- a/apps/dokploy/drizzle/0094_brief_silver_fox.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE "domain" ADD COLUMN "internalPath" text DEFAULT '/';--> statement-breakpoint
-ALTER TABLE "domain" ADD COLUMN "stripPath" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0094_snapshot.json b/apps/dokploy/drizzle/meta/0094_snapshot.json
deleted file mode 100644
index b8bbfe738..000000000
--- a/apps/dokploy/drizzle/meta/0094_snapshot.json
+++ /dev/null
@@ -1,5732 +0,0 @@
-{
- "id": "e889e477-f997-4d54-b2f9-0e59e7050c03",
- "prevId": "9df38a75-e90e-4dff-9f41-9152e331fb16",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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'"
- },
- "internalPath": {
- "name": "internalPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "stripPath": {
- "name": "stripPath",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- }
- },
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "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 72cd2090b..68e363044 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -659,13 +659,6 @@
"when": 1750397258622,
"tag": "0093_nice_gorilla_man",
"breakpoints": true
- },
- {
- "idx": 94,
- "version": "7",
- "when": 1750443891684,
- "tag": "0094_brief_silver_fox",
- "breakpoints": true
}
]
}
\ No newline at end of file
From b685a817fd745b1b1546ec1779116e29fab5df4f Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:39:22 -0600
Subject: [PATCH 06/56] feat(domain): add internalPath and stripPath columns to
domain schema
- Introduced new columns `internalPath` (text) with a default value of '/' and `stripPath` (boolean) with a default value of false to the domain table.
- Updated journal metadata to reflect the addition of these columns.
---
.../dokploy/drizzle/0098_warm_tiger_shark.sql | 2 +
apps/dokploy/drizzle/meta/0098_snapshot.json | 5840 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
3 files changed, 5849 insertions(+)
create mode 100644 apps/dokploy/drizzle/0098_warm_tiger_shark.sql
create mode 100644 apps/dokploy/drizzle/meta/0098_snapshot.json
diff --git a/apps/dokploy/drizzle/0098_warm_tiger_shark.sql b/apps/dokploy/drizzle/0098_warm_tiger_shark.sql
new file mode 100644
index 000000000..2ba7289fb
--- /dev/null
+++ b/apps/dokploy/drizzle/0098_warm_tiger_shark.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "domain" ADD COLUMN "internalPath" text DEFAULT '/';--> statement-breakpoint
+ALTER TABLE "domain" ADD COLUMN "stripPath" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0098_snapshot.json b/apps/dokploy/drizzle/meta/0098_snapshot.json
new file mode 100644
index 000000000..ee69bfd6b
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0098_snapshot.json
@@ -0,0 +1,5840 @@
+{
+ "id": "6903c6d7-6a8f-4f52-9e29-52251005d1e8",
+ "prevId": "fdc95bd1-866c-4efd-9dce-20ed08f5b0b5",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 e703e0596..a979e7dc7 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -687,6 +687,13 @@
"when": 1750567641441,
"tag": "0097_hard_lizard",
"breakpoints": true
+ },
+ {
+ "idx": 98,
+ "version": "7",
+ "when": 1750570751159,
+ "tag": "0098_warm_tiger_shark",
+ "breakpoints": true
}
]
}
\ No newline at end of file
From 7f0bdc7e009f6831441e811b95dda7fa335bb231 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:42:18 -0600
Subject: [PATCH 07/56] feat(domain): add internalPath and stripPath properties
to domain configuration
- Updated test files to include new properties `internalPath` and `stripPath` in domain configurations.
- Removed deprecated `createMultiPathDomain` function from the domain service to streamline the codebase.
---
.../__test__/compose/domain/labels.test.ts | 2 +
apps/dokploy/__test__/traefik/traefik.test.ts | 2 +
packages/server/src/services/domain.ts | 41 -------------------
3 files changed, 4 insertions(+), 41 deletions(-)
diff --git a/apps/dokploy/__test__/compose/domain/labels.test.ts b/apps/dokploy/__test__/compose/domain/labels.test.ts
index c5f45810f..172bff2af 100644
--- a/apps/dokploy/__test__/compose/domain/labels.test.ts
+++ b/apps/dokploy/__test__/compose/domain/labels.test.ts
@@ -19,6 +19,8 @@ describe("createDomainLabels", () => {
path: "/",
createdAt: "",
previewDeploymentId: "",
+ internalPath: "/",
+ stripPath: false,
};
it("should create basic labels for web entrypoint", async () => {
diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts
index 5cd033af5..f2d0f0a50 100644
--- a/apps/dokploy/__test__/traefik/traefik.test.ts
+++ b/apps/dokploy/__test__/traefik/traefik.test.ts
@@ -119,6 +119,8 @@ const baseDomain: Domain = {
domainType: "application",
uniqueConfigKey: 1,
previewDeploymentId: "",
+ internalPath: "/",
+ stripPath: false,
};
const baseRedirect: Redirect = {
diff --git a/packages/server/src/services/domain.ts b/packages/server/src/services/domain.ts
index 352eb00db..f81fffb96 100644
--- a/packages/server/src/services/domain.ts
+++ b/packages/server/src/services/domain.ts
@@ -201,44 +201,3 @@ export const validateDomain = async (
};
}
};
-
-export const createMultiPathDomain = async (
- applicationId: string,
- domains: Array<{
- host: string;
- externalPath?: string;
- internalPath: string;
- port?: number;
- https?: boolean;
- stripPath?: boolean;
- }>
-) => {
- const app = await findApplicationById(applicationId);
- if (!app) {
- throw new TRPCError({
- code: "NOT_FOUND",
- message: "Application not found",
- });
- }
-
- const createdDomains = [];
-
- for (const domainConfig of domains) {
- const domain = await createDomain({
- applicationId,
- host: domainConfig.host,
- path: domainConfig.externalPath || "/",
- internalPath: domainConfig.internalPath,
- port: domainConfig.port || 3000,
- https: domainConfig.https || false,
- stripPath: domainConfig.stripPath || false,
- serviceName: app.appName,
- domainType: "application",
- certificateType: domainConfig.https ? "letsencrypt" : "none",
- });
-
- createdDomains.push(domain);
- }
-
- return createdDomains;
-};
From 113e4ae4b5228e64e272edcfcc433c9ace0882d3 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:43:52 -0600
Subject: [PATCH 08/56] fix(middleware): update domain type and improve
middleware configuration
- Changed the type of the `domain` parameter in `createPathMiddlewares` from `any` to `Domain` for better type safety.
- Added missing commas in middleware configuration objects to ensure proper syntax.
---
packages/server/src/utils/traefik/middleware.ts | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/packages/server/src/utils/traefik/middleware.ts b/packages/server/src/utils/traefik/middleware.ts
index 0711a5034..3862b9e8b 100644
--- a/packages/server/src/utils/traefik/middleware.ts
+++ b/packages/server/src/utils/traefik/middleware.ts
@@ -6,6 +6,7 @@ import type { ApplicationNested } from "../builders";
import { execAsyncRemote } from "../process/execAsync";
import { writeTraefikConfigRemote } from "./application";
import type { FileConfig } from "./file-types";
+import type { Domain } from "@dokploy/server/services/domain";
export const addMiddleware = (config: FileConfig, middlewareName: string) => {
if (config.http?.routers) {
@@ -108,7 +109,7 @@ export const writeMiddleware = (config: T) => {
export const createPathMiddlewares = async (
app: ApplicationNested,
- domain: any
+ domain: Domain,
) => {
let config: FileConfig;
@@ -141,8 +142,8 @@ export const createPathMiddlewares = async (
const middlewareName = `addprefix-${appName}-${uniqueConfigKey}`;
config.http.middlewares[middlewareName] = {
addPrefix: {
- prefix: internalPath
- }
+ prefix: internalPath,
+ },
};
}
@@ -151,8 +152,8 @@ export const createPathMiddlewares = async (
const middlewareName = `stripprefix-${appName}-${uniqueConfigKey}`;
config.http.middlewares[middlewareName] = {
stripPrefix: {
- prefixes: [path]
- }
+ prefixes: [path],
+ },
};
}
@@ -165,7 +166,7 @@ export const createPathMiddlewares = async (
export const removePathMiddlewares = async (
app: ApplicationNested,
- uniqueConfigKey: number
+ uniqueConfigKey: number,
) => {
let config: FileConfig;
From 8599f519a41fe636b478d48f5d8676fcfafdce55 Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Sun, 22 Jun 2025 05:44:21 +0000
Subject: [PATCH 09/56] [autofix.ci] apply automated fixes
---
.../dashboard/application/domains/handle-domain.tsx | 6 ++++--
packages/server/src/utils/traefik/domain.ts | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
index 8f9c279c5..ff3781daf 100644
--- a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
@@ -485,7 +485,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
Internal Path
- The path where your application expects to receive requests internally (defaults to "/")
+ The path where your application expects to receive
+ requests internally (defaults to "/")
@@ -504,7 +505,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
Strip Path
- Remove the external path from the request before forwarding to the application
+ Remove the external path from the request before
+ forwarding to the application
diff --git a/packages/server/src/utils/traefik/domain.ts b/packages/server/src/utils/traefik/domain.ts
index 9f01c8d8a..68095fa80 100644
--- a/packages/server/src/utils/traefik/domain.ts
+++ b/packages/server/src/utils/traefik/domain.ts
@@ -112,7 +112,8 @@ export const createRouterConfig = async (
const { appName, redirects, security } = app;
const { certificateType } = domain;
- const { host, path, https, uniqueConfigKey, internalPath, stripPath } = domain;
+ const { host, path, https, uniqueConfigKey, internalPath, stripPath } =
+ domain;
const routerConfig: HttpRouter = {
rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`,
service: `${appName}-service-${uniqueConfigKey}`,
From fd0f679d0f79ca949c442b1fe33b727efb83a9ef Mon Sep 17 00:00:00 2001
From: Jhonatan Caldeira
Date: Sun, 22 Jun 2025 14:55:27 -0300
Subject: [PATCH 10/56] feat(domains): add internal path routing and strip
path functionality to compose
- Add internalPath field to route requests
to different paths internally
- Add stripPath option to remove external
path prefix before forwarding
- Improves validation for stripPath (requires
non-root path) and internalPath (must start
with /)
---
.../application/domains/handle-domain.tsx | 18 +++++++++
packages/server/src/db/validations/domain.ts | 40 +++++++++++++++++++
packages/server/src/utils/docker/domain.ts | 22 ++++++++++
3 files changed, 80 insertions(+)
diff --git a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
index ff3781daf..53f899e94 100644
--- a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
@@ -86,6 +86,24 @@ export const domain = z
message: "Required",
});
}
+
+ // Validate stripPath requires a valid path
+ if (input.stripPath && (!input.path || input.path === "/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["stripPath"],
+ message: "Strip path can only be enabled when a path other than '/' is specified",
+ });
+ }
+
+ // Validate internalPath starts with /
+ if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["internalPath"],
+ message: "Internal path must start with '/'",
+ });
+ }
});
type Domain = z.infer;
diff --git a/packages/server/src/db/validations/domain.ts b/packages/server/src/db/validations/domain.ts
index 75dc56ffd..6fc74c74e 100644
--- a/packages/server/src/db/validations/domain.ts
+++ b/packages/server/src/db/validations/domain.ts
@@ -4,6 +4,8 @@ export const domain = z
.object({
host: z.string().min(1, { message: "Add a hostname" }),
path: z.string().min(1).optional(),
+ internalPath: z.string().optional(),
+ stripPath: z.boolean().optional(),
port: z
.number()
.min(1, { message: "Port must be at least 1" })
@@ -29,12 +31,32 @@ export const domain = z
message: "Required when certificate type is custom",
});
}
+
+ // Validate stripPath requires a valid path
+ if (input.stripPath && (!input.path || input.path === "/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["stripPath"],
+ message: "Strip path can only be enabled when a path other than '/' is specified",
+ });
+ }
+
+ // Validate internalPath starts with /
+ if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["internalPath"],
+ message: "Internal path must start with '/'",
+ });
+ }
});
export const domainCompose = z
.object({
host: z.string().min(1, { message: "Host is required" }),
path: z.string().min(1).optional(),
+ internalPath: z.string().optional(),
+ stripPath: z.boolean().optional(),
port: z
.number()
.min(1, { message: "Port must be at least 1" })
@@ -61,4 +83,22 @@ export const domainCompose = z
message: "Required when certificate type is custom",
});
}
+
+ // Validate stripPath requires a valid path
+ if (input.stripPath && (!input.path || input.path === "/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["stripPath"],
+ message: "Strip path can only be enabled when a path other than '/' is specified",
+ });
+ }
+
+ // Validate internalPath starts with /
+ if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ path: ["internalPath"],
+ message: "Internal path must start with '/'",
+ });
+ }
});
diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts
index 4f0083979..1739f2f13 100644
--- a/packages/server/src/utils/docker/domain.ts
+++ b/packages/server/src/utils/docker/domain.ts
@@ -301,6 +301,8 @@ export const createDomainLabels = (
certificateType,
path,
customCertResolver,
+ stripPath,
+ internalPath
} = domain;
const routerName = `${appName}-${uniqueConfigKey}-${entrypoint}`;
const labels = [
@@ -310,6 +312,26 @@ export const createDomainLabels = (
`traefik.http.routers.${routerName}.service=${routerName}`,
];
+ // Validate stripPath - it should only be used when path is defined and not "/"
+ if (stripPath) {
+ if (!path || path === "/") {
+ console.warn(`stripPath is enabled but path is not defined or is "/" for domain ${host}`);
+ } else {
+ const middlewareName = `stripprefix-${appName}-${uniqueConfigKey}`;
+ labels.push(`traefik.http.middlewares.${middlewareName}.stripprefix.prefixes=${path}`);
+ }
+ }
+
+ // Validate internalPath - ensure it's a valid path format
+ if (internalPath && internalPath !== "/") {
+ if (!internalPath.startsWith("/")) {
+ console.warn(`internalPath "${internalPath}" should start with "/" and not be empty for domain ${host}`);
+ } else {
+ const middlewareName = `addprefix-${appName}-${uniqueConfigKey}`;
+ labels.push(`traefik.http.middlewares.${middlewareName}.addprefix.prefix=${internalPath}`);
+ }
+ }
+
if (entrypoint === "web" && https) {
labels.push(
`traefik.http.routers.${routerName}.middlewares=redirect-to-https@file`,
From 3b5428697b883f4df06225c3727547ddf5544ae1 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 26 Jun 2025 21:13:09 -0600
Subject: [PATCH 11/56] feat(rollbacks): add backup and restore instructions
for license-named backups
- Introduced a new Backup file containing detailed steps for creating and restoring backups using Docker.
- Included commands for stopping services, removing volumes, and managing backup files.
---
.../dashboard/application/rollbacks/Backup | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 apps/dokploy/components/dashboard/application/rollbacks/Backup
diff --git a/apps/dokploy/components/dashboard/application/rollbacks/Backup b/apps/dokploy/components/dashboard/application/rollbacks/Backup
new file mode 100644
index 000000000..3b7612b40
--- /dev/null
+++ b/apps/dokploy/components/dashboard/application/rollbacks/Backup
@@ -0,0 +1,30 @@
+Backup
+
+1. docker ps --filter "label=com.docker.swarm.service.name=license-namedbackups-abxelc" --format "{{.Names}}"
+2. docker run --rm \
+--volumes-from "license-namedbackups-abxelc.1.m3cxy78ocj3w0zu42kmgamc5y" \
+-v $(pwd):/backup \
+ubuntu \
+tar cvf /backup/backup.tar /var/lib/postgresql/data
+
+
+docker run --rm \
+ -v license-namedbackups-abxelc-data:/volume_data \
+ -v $(pwd):/backup \
+ ubuntu \
+ bash -c "cd /volume_data && tar cvf /backup/generic_backup.tar ."
+
+
+2. Restore
+
+docker stop license-namedbackups-abxelc
+
+docker volume rm license-namedbackups-abxelc.1.m3cxy78ocj3w0zu42kmgamc5y
+
+
+1. docker ps --filter "label=com.docker.swarm.service.name=license-namedbackups-abxelc" --format "{{.Names}}"
+2. docker run --rm \
+-v license-namedbackups-abxelc-data:/volume_data \
+-v $(pwd):/backup \
+ubuntu \
+bash -c "cd /volume_data && tar xvf /backup/generic_backup.tar && chown -R 999:999 ."
\ No newline at end of file
From 9ede3bd71b13a4acd9efe882a1bde64405758f31 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 28 Jun 2025 13:17:34 -0600
Subject: [PATCH 12/56] feat(rollbacks): update backup and restore instructions
for N8N data
- Added detailed commands for backing up and restoring N8N data using Docker.
- Included steps for scaling services and managing permissions during the restore process.
- Enhanced clarity of backup commands and added comments for better understanding.
---
.../dashboard/application/rollbacks/Backup | 90 +++++++++++++++++--
1 file changed, 84 insertions(+), 6 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/rollbacks/Backup b/apps/dokploy/components/dashboard/application/rollbacks/Backup
index 3b7612b40..2a58e92df 100644
--- a/apps/dokploy/components/dashboard/application/rollbacks/Backup
+++ b/apps/dokploy/components/dashboard/application/rollbacks/Backup
@@ -1,5 +1,5 @@
Backup
-
+# license-namedbackups-abxelc
1. docker ps --filter "label=com.docker.swarm.service.name=license-namedbackups-abxelc" --format "{{.Names}}"
2. docker run --rm \
--volumes-from "license-namedbackups-abxelc.1.m3cxy78ocj3w0zu42kmgamc5y" \
@@ -8,6 +8,10 @@ ubuntu \
tar cvf /backup/backup.tar /var/lib/postgresql/data
+# Official Command Backup
+
+1. Backup
+
docker run --rm \
-v license-namedbackups-abxelc-data:/volume_data \
-v $(pwd):/backup \
@@ -17,14 +21,88 @@ docker run --rm \
2. Restore
-docker stop license-namedbackups-abxelc
+docker service scale license-namedbackups-abxelc=0
-docker volume rm license-namedbackups-abxelc.1.m3cxy78ocj3w0zu42kmgamc5y
+docker volume rm license-namedbackups-abxelc-data
-
-1. docker ps --filter "label=com.docker.swarm.service.name=license-namedbackups-abxelc" --format "{{.Names}}"
2. docker run --rm \
-v license-namedbackups-abxelc-data:/volume_data \
-v $(pwd):/backup \
ubuntu \
-bash -c "cd /volume_data && tar xvf /backup/generic_backup.tar && chown -R 999:999 ."
\ No newline at end of file
+bash -c "cd /volume_data && tar xvf /backup/generic_backup.tar ."
+
+docker service scale license-namedbackups-abxelc=1
+
+
+root@srv594061:~# docker volume inspect n8n_data-data
+[
+ {
+ "CreatedAt": "2025-06-28T18:07:44Z",
+ "Driver": "local",
+ "Labels": null,
+ "Mountpoint": "/var/lib/docker/volumes/n8n_data-data/_data",
+ "Name": "n8n_data-data",
+ "Options": null,
+ "Scope": "local"
+ }
+]
+
+Archivos funcuionando creados por N8N
+
+# root@srv594061:~# cd /var/lib/docker/volumes/n8n_data-data/_data
+# root@srv594061:/var/lib/docker/volumes/n8n_data-data/_data# ls
+# binaryData config crash.journal database.sqlite git n8nEventLog.log ssh
+
+Luego que intente hacer el backup con el comando de backup
+
+
+root@srv594061:~# docker run --rm -v n8n_data-data:/volume_data -v $(pwd):/backup ubuntu bash -c "cd /volume_data && tar cvf /backup/generic_backup6.tar ."
+./
+./config
+./crash.journal
+./binaryData/
+./git/
+./database.sqlite
+./ssh/
+./n8nEventLog.log
+root@srv594061:~#
+
+# Paramos la aplicacion
+docker service scale n8n=0
+
+# Haciendo el restore
+root@srv594061:~# docker volume rm n8n_data-data
+n8n_data-data
+root@srv594061:~# docker run --rm -v n8n_data-data:/volume_data -v $(pwd):/backup ubuntu bash -c "cd /volume_data && tar xvf /backup/generic_backup6.tar && chown -R 999:999 ."
+./
+./config
+./crash.journal
+./binaryData/
+./git/
+./database.sqlite
+./ssh/
+./n8nEventLog.log
+
+# Tenemos los archivos en el volumen
+root@srv594061:~# ls /var/lib/docker/volumes/n8n_data-data/_data
+binaryData config crash.journal database.sqlite git n8nEventLog.log ssh
+root@srv594061:~#
+
+docker service scale n8n=1
+
+# Luego en N8N Cuando se que el volumen tiene la data
+Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
+User settings loaded from: /home/node/.n8n/config
+Last session crashed
+Error: EACCES: permission denied, open '/home/node/.n8n/crash.journal'
+at open (node:internal/fs/promises:639:25)
+at touchFile (/usr/local/lib/node_modules/n8n/dist/crash-journal.js:18:20)
+at Object.init (/usr/local/lib/node_modules/n8n/dist/crash-journal.js:32:5)
+at Start.initCrashJournal (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:113:9)
+at Start.init (/usr/local/lib/node_modules/n8n/dist/commands/start.js:141:9)
+at Start._run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/command.js:301:13)
+at Config.runCommand (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/config/config.js:424:25)
+at run (/usr/local/lib/node_modules/n8n/node_modules/@oclif/core/lib/main.js:94:16)
+at /usr/local/lib/node_modules/n8n/bin/n8n:71:2
+TypeError: Cannot read properties of undefined (reading 'error')
+
From fac96b5db55517442f89a4bdd3071262abf7aecc Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Sun, 29 Jun 2025 20:11:18 +0000
Subject: [PATCH 13/56] [autofix.ci] apply automated fixes
---
.../application/domains/handle-domain.tsx | 9 +++++++--
packages/server/src/db/validations/domain.ts | 18 ++++++++++++++----
packages/server/src/utils/docker/domain.ts | 18 +++++++++++++-----
3 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
index 53f899e94..c8522f5f5 100644
--- a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx
@@ -92,12 +92,17 @@ export const domain = z
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["stripPath"],
- message: "Strip path can only be enabled when a path other than '/' is specified",
+ message:
+ "Strip path can only be enabled when a path other than '/' is specified",
});
}
// Validate internalPath starts with /
- if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ if (
+ input.internalPath &&
+ input.internalPath !== "/" &&
+ !input.internalPath.startsWith("/")
+ ) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["internalPath"],
diff --git a/packages/server/src/db/validations/domain.ts b/packages/server/src/db/validations/domain.ts
index 6fc74c74e..a10c96dcc 100644
--- a/packages/server/src/db/validations/domain.ts
+++ b/packages/server/src/db/validations/domain.ts
@@ -37,12 +37,17 @@ export const domain = z
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["stripPath"],
- message: "Strip path can only be enabled when a path other than '/' is specified",
+ message:
+ "Strip path can only be enabled when a path other than '/' is specified",
});
}
// Validate internalPath starts with /
- if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ if (
+ input.internalPath &&
+ input.internalPath !== "/" &&
+ !input.internalPath.startsWith("/")
+ ) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["internalPath"],
@@ -89,12 +94,17 @@ export const domainCompose = z
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["stripPath"],
- message: "Strip path can only be enabled when a path other than '/' is specified",
+ message:
+ "Strip path can only be enabled when a path other than '/' is specified",
});
}
// Validate internalPath starts with /
- if (input.internalPath && input.internalPath !== "/" && !input.internalPath.startsWith("/")) {
+ if (
+ input.internalPath &&
+ input.internalPath !== "/" &&
+ !input.internalPath.startsWith("/")
+ ) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["internalPath"],
diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts
index 1739f2f13..7ed4b4386 100644
--- a/packages/server/src/utils/docker/domain.ts
+++ b/packages/server/src/utils/docker/domain.ts
@@ -302,7 +302,7 @@ export const createDomainLabels = (
path,
customCertResolver,
stripPath,
- internalPath
+ internalPath,
} = domain;
const routerName = `${appName}-${uniqueConfigKey}-${entrypoint}`;
const labels = [
@@ -315,20 +315,28 @@ export const createDomainLabels = (
// Validate stripPath - it should only be used when path is defined and not "/"
if (stripPath) {
if (!path || path === "/") {
- console.warn(`stripPath is enabled but path is not defined or is "/" for domain ${host}`);
+ console.warn(
+ `stripPath is enabled but path is not defined or is "/" for domain ${host}`,
+ );
} else {
const middlewareName = `stripprefix-${appName}-${uniqueConfigKey}`;
- labels.push(`traefik.http.middlewares.${middlewareName}.stripprefix.prefixes=${path}`);
+ labels.push(
+ `traefik.http.middlewares.${middlewareName}.stripprefix.prefixes=${path}`,
+ );
}
}
// Validate internalPath - ensure it's a valid path format
if (internalPath && internalPath !== "/") {
if (!internalPath.startsWith("/")) {
- console.warn(`internalPath "${internalPath}" should start with "/" and not be empty for domain ${host}`);
+ console.warn(
+ `internalPath "${internalPath}" should start with "/" and not be empty for domain ${host}`,
+ );
} else {
const middlewareName = `addprefix-${appName}-${uniqueConfigKey}`;
- labels.push(`traefik.http.middlewares.${middlewareName}.addprefix.prefix=${internalPath}`);
+ labels.push(
+ `traefik.http.middlewares.${middlewareName}.addprefix.prefix=${internalPath}`,
+ );
}
}
From ce88a0a5f2d169e55d1ada1841937dd2ac2295d2 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 29 Jun 2025 22:22:10 -0600
Subject: [PATCH 14/56] feat: implement volume backup management functionality
- Added components for handling and displaying volume backups in the dashboard.
- Created API routes for managing volume backups, including create, update, delete, and list operations.
- Introduced database schema for volume backups, including necessary fields and relationships.
- Updated the application to integrate volume backup features into the service management interface.
---
.../volume-backups/handle-volume-backups.tsx | 467 ++
.../volume-backups/show-volume-backups.tsx | 237 +
apps/dokploy/drizzle/0099_eminent_phalanx.sql | 30 +
.../dokploy/drizzle/0100_living_proudstar.sql | 1 +
apps/dokploy/drizzle/0101_kind_black_tom.sql | 1 +
apps/dokploy/drizzle/0102_lush_ink.sql | 1 +
apps/dokploy/drizzle/0103_mean_jimmy_woo.sql | 2 +
apps/dokploy/drizzle/meta/0099_snapshot.json | 6070 ++++++++++++++++
apps/dokploy/drizzle/meta/0100_snapshot.json | 6076 ++++++++++++++++
apps/dokploy/drizzle/meta/0101_snapshot.json | 6076 ++++++++++++++++
apps/dokploy/drizzle/meta/0102_snapshot.json | 6083 +++++++++++++++++
apps/dokploy/drizzle/meta/0103_snapshot.json | 6083 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 35 +
.../services/application/[applicationId].tsx | 21 +-
apps/dokploy/server/api/root.ts | 2 +
.../server/api/routers/volume-backups.ts | 76 +
packages/server/src/db/schema/index.ts | 1 +
.../server/src/db/schema/volume-backups.ts | 110 +
packages/server/src/index.ts | 1 +
.../server/src/services/volume-backups.ts | 51 +
20 files changed, 31423 insertions(+), 1 deletion(-)
create mode 100644 apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
create mode 100644 apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
create mode 100644 apps/dokploy/drizzle/0099_eminent_phalanx.sql
create mode 100644 apps/dokploy/drizzle/0100_living_proudstar.sql
create mode 100644 apps/dokploy/drizzle/0101_kind_black_tom.sql
create mode 100644 apps/dokploy/drizzle/0102_lush_ink.sql
create mode 100644 apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
create mode 100644 apps/dokploy/drizzle/meta/0099_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0100_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0101_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0102_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0103_snapshot.json
create mode 100644 apps/dokploy/server/api/routers/volume-backups.ts
create mode 100644 packages/server/src/db/schema/volume-backups.ts
create mode 100644 packages/server/src/services/volume-backups.ts
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
new file mode 100644
index 000000000..14ff498ba
--- /dev/null
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -0,0 +1,467 @@
+import { AlertBlock } from "@/components/shared/alert-block";
+import { Button } from "@/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from "@/components/ui/dialog";
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import { Input } from "@/components/ui/input";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import { Switch } from "@/components/ui/switch";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { cn } from "@/lib/utils";
+import { api } from "@/utils/api";
+import { zodResolver } from "@hookform/resolvers/zod";
+import {
+ DatabaseZap,
+ Info,
+ PenBoxIcon,
+ PlusCircle,
+ RefreshCw,
+} from "lucide-react";
+import { useEffect, useState } from "react";
+import { useForm } from "react-hook-form";
+import { toast } from "sonner";
+import { z } from "zod";
+import type { CacheType } from "../domains/handle-domain";
+import { commonCronExpressions } from "../schedules/handle-schedules";
+
+const formSchema = z
+ .object({
+ name: z.string().min(1, "Name is required"),
+ cronExpression: z.string().min(1, "Cron expression is required"),
+ volumeName: z.string(),
+ hostPath: z.string(),
+ prefix: z.string(),
+ keepLatestCount: z.coerce.number().optional(),
+ turnOff: z.boolean().default(false),
+ volumeBackupType: z.enum(["bind", "volume"]),
+ enabled: z.boolean().default(true),
+ serviceName: z.string(),
+ destinationId: z.string().min(1, "Destination required"),
+ scheduleType: z.enum([
+ "application",
+ "compose",
+ "postgres",
+ "mariadb",
+ "mongo",
+ "mysql",
+ "redis",
+ ]),
+ })
+ .superRefine((data, ctx) => {
+ if (data.scheduleType === "compose" && !data.serviceName) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Service name is required",
+ path: ["serviceName"],
+ });
+ }
+ });
+
+interface Props {
+ id?: string;
+ volumeBackupId?: string;
+ volumeBackupType?:
+ | "application"
+ | "compose"
+ | "postgres"
+ | "mariadb"
+ | "mongo"
+ | "mysql"
+ | "redis";
+}
+
+export const HandleVolumeBackups = ({
+ id,
+ volumeBackupId,
+ volumeBackupType,
+}: Props) => {
+ const [isOpen, setIsOpen] = useState(false);
+ const [cacheType, setCacheType] = useState("cache");
+
+ const utils = api.useUtils();
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ name: "",
+ cronExpression: "",
+ volumeName: "",
+ hostPath: "",
+ prefix: "",
+ keepLatestCount: undefined,
+ turnOff: false,
+ volumeBackupType: "volume",
+ enabled: true,
+ serviceName: "",
+ },
+ });
+
+ const scheduleTypeForm = form.watch("scheduleType");
+
+ const { data: volumeBackup } = api.volumeBackups.one.useQuery(
+ { volumeBackupId: volumeBackupId || "" },
+ { enabled: !!volumeBackupId },
+ );
+
+ const {
+ data: services,
+ isFetching: isLoadingServices,
+ error: errorServices,
+ refetch: refetchServices,
+ } = api.compose.loadServices.useQuery(
+ {
+ composeId: id || "",
+ type: cacheType,
+ },
+ {
+ retry: false,
+ refetchOnWindowFocus: false,
+ enabled: !!id && volumeBackupType === "compose",
+ },
+ );
+
+ useEffect(() => {
+ if (volumeBackupId && volumeBackup) {
+ form.reset({
+ name: volumeBackup.name,
+ cronExpression: volumeBackup.cronExpression,
+ volumeName: volumeBackup.volumeName || "",
+ hostPath: volumeBackup.hostPath || "",
+ prefix: volumeBackup.prefix,
+ keepLatestCount: volumeBackup.keepLatestCount,
+ turnOff: volumeBackup.turnOff,
+ volumeBackupType: volumeBackup.type,
+ enabled: volumeBackup.enabled,
+ serviceName: volumeBackup.serviceName || "",
+ destinationId: volumeBackup.destinationId,
+ });
+ }
+ }, [form, volumeBackup, volumeBackupId]);
+
+ const { mutateAsync, isLoading } = volumeBackupId
+ ? api.volumeBackups.update.useMutation()
+ : api.volumeBackups.create.useMutation();
+
+ const onSubmit = async (values: z.infer) => {
+ if (!id && !volumeBackupId) return;
+
+ await mutateAsync({
+ ...values,
+ destinationId: values.destinationId,
+ volumeBackupId: volumeBackupId || "",
+ ...(volumeBackupType === "application" && {
+ applicationId: id || "",
+ }),
+ ...(volumeBackupType === "compose" && {
+ composeId: id || "",
+ }),
+ ...(volumeBackupType === "postgres" && {
+ serverId: id || "",
+ }),
+ ...(volumeBackupType === "postgres" && {
+ postgresId: id || "",
+ }),
+ ...(volumeBackupType === "mariadb" && {
+ mariadbId: id || "",
+ }),
+ ...(volumeBackupType === "mongo" && {
+ mongoId: id || "",
+ }),
+ ...(volumeBackupType === "mysql" && {
+ mysqlId: id || "",
+ }),
+ ...(volumeBackupType === "redis" && {
+ redisId: id || "",
+ }),
+ })
+ .then(() => {
+ toast.success(
+ `Volume backup ${volumeBackupId ? "updated" : "created"} successfully`,
+ );
+ utils.volumeBackups.list.invalidate({
+ id,
+ volumeBackupType,
+ });
+ setIsOpen(false);
+ })
+ .catch((error) => {
+ toast.error(
+ error instanceof Error ? error.message : "An unknown error occurred",
+ );
+ });
+ };
+
+ return (
+
+
+ {volumeBackupId ? (
+
+
+
+ ) : (
+
+
+ Add Volume Backup
+
+ )}
+
+
+
+
+ {volumeBackupId ? "Edit" : "Create"} Volume Backup
+
+
+ Create a volume backup to backup your volume to a destination
+
+
+
+
+
+
+ );
+};
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
new file mode 100644
index 000000000..680b47e52
--- /dev/null
+++ b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
@@ -0,0 +1,237 @@
+import { DialogAction } from "@/components/shared/dialog-action";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { api } from "@/utils/api";
+import { Clock, DatabaseBackup, Loader2, Play, Trash2 } from "lucide-react";
+import { toast } from "sonner";
+import { HandleVolumeBackups } from "./handle-volume-backups";
+
+interface Props {
+ id: string;
+ volumeBackupType?:
+ | "application"
+ | "compose"
+ | "postgres"
+ | "mariadb"
+ | "mongo"
+ | "mysql";
+}
+
+export const ShowVolumeBackups = ({
+ id,
+ volumeBackupType = "application",
+}: Props) => {
+ const {
+ data: volumeBackups,
+ isLoading: isLoadingVolumeBackups,
+ refetch: refetchVolumeBackups,
+ } = api.volumeBackups.list.useQuery(
+ {
+ id: id || "",
+ volumeBackupType,
+ },
+ {
+ enabled: !!id,
+ },
+ );
+
+ const utils = api.useUtils();
+
+ const { mutateAsync: deleteVolumeBackup, isLoading: isDeleting } =
+ api.volumeBackups.delete.useMutation();
+
+ const { mutateAsync: runManually, isLoading } =
+ api.volumeBackups.runManually.useMutation();
+
+ return (
+
+
+
+
+
+ Volume Backups
+
+
+ Schedule volume backups to run automatically at specified
+ intervals.
+
+
+
+ {volumeBackups && volumeBackups.length > 0 && (
+
+ )}
+
+
+
+ {isLoadingVolumeBackups ? (
+
+
+
+ Loading volume backups...
+
+
+ ) : volumeBackups && volumeBackups.length > 0 ? (
+
+ {volumeBackups.map((volumeBackup) => {
+ return (
+
+
+
+
+
+
+
+
+ {volumeBackup.name}
+
+
+ {volumeBackup.enabled ? "Enabled" : "Disabled"}
+
+
+
+
+ Cron: {volumeBackup.cronExpression}
+
+ {/* {schedule.scheduleType !== "server" &&
+ schedule.scheduleType !== "dokploy-server" && (
+ <>
+
+ •
+
+
+ {schedule.shellType}
+
+ >
+ )} */}
+
+
+
+
+
+ {/*
+
+
+
+ */}
+
+
+
+
+ {
+ toast.success("Volume backup run successfully");
+
+ await runManually({
+ volumeBackupId: volumeBackup.volumeBackupId,
+ })
+ .then(async () => {
+ await new Promise((resolve) =>
+ setTimeout(resolve, 1500),
+ );
+ refetchVolumeBackups();
+ })
+ .catch(() => {
+ toast.error("Error running volume backup");
+ });
+ }}
+ >
+
+
+
+
+ Run Manual Volume Backup
+
+
+
+
+
+
+
{
+ await deleteVolumeBackup({
+ volumeBackupId: volumeBackup.volumeBackupId,
+ })
+ .then(() => {
+ utils.volumeBackups.list.invalidate({
+ id,
+ volumeBackupType,
+ });
+ toast.success("Volume backup deleted successfully");
+ })
+ .catch(() => {
+ toast.error("Error deleting volume backup");
+ });
+ }}
+ >
+
+
+
+
+
+
+ );
+ })}
+
+ ) : (
+
+
+
+ No volume backups
+
+
+ Create your first volume backup to automate your workflows
+
+
+
+ )}
+
+
+ );
+};
diff --git a/apps/dokploy/drizzle/0099_eminent_phalanx.sql b/apps/dokploy/drizzle/0099_eminent_phalanx.sql
new file mode 100644
index 000000000..b33e56d61
--- /dev/null
+++ b/apps/dokploy/drizzle/0099_eminent_phalanx.sql
@@ -0,0 +1,30 @@
+CREATE TYPE "public"."volumeBackupType" AS ENUM('bind', 'volume');--> statement-breakpoint
+CREATE TABLE "volume_backup" (
+ "volumeBackupId" text PRIMARY KEY NOT NULL,
+ "name" text NOT NULL,
+ "type" "volumeBackupType" DEFAULT 'volume' NOT NULL,
+ "volumeName" text,
+ "hostPath" text,
+ "prefix" text NOT NULL,
+ "serviceType" "serviceType" DEFAULT 'application' NOT NULL,
+ "schedule" text NOT NULL,
+ "keepLatestCount" integer,
+ "applicationId" text,
+ "postgresId" text,
+ "mariadbId" text,
+ "mongoId" text,
+ "mysqlId" text,
+ "redisId" text,
+ "composeId" text,
+ "createdAt" text NOT NULL,
+ "destinationId" text NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0100_living_proudstar.sql b/apps/dokploy/drizzle/0100_living_proudstar.sql
new file mode 100644
index 000000000..25f737f01
--- /dev/null
+++ b/apps/dokploy/drizzle/0100_living_proudstar.sql
@@ -0,0 +1 @@
+ALTER TABLE "volume_backup" ADD COLUMN "enabled" boolean;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0101_kind_black_tom.sql b/apps/dokploy/drizzle/0101_kind_black_tom.sql
new file mode 100644
index 000000000..239f7e7d9
--- /dev/null
+++ b/apps/dokploy/drizzle/0101_kind_black_tom.sql
@@ -0,0 +1 @@
+ALTER TABLE "volume_backup" RENAME COLUMN "schedule" TO "cronExpression";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0102_lush_ink.sql b/apps/dokploy/drizzle/0102_lush_ink.sql
new file mode 100644
index 000000000..eb74b6d96
--- /dev/null
+++ b/apps/dokploy/drizzle/0102_lush_ink.sql
@@ -0,0 +1 @@
+ALTER TABLE "backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql b/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
new file mode 100644
index 000000000..338cd31d9
--- /dev/null
+++ b/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "volume_backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "backup" DROP COLUMN "turnOff";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0099_snapshot.json b/apps/dokploy/drizzle/meta/0099_snapshot.json
new file mode 100644
index 000000000..d14875a5d
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0099_snapshot.json
@@ -0,0 +1,6070 @@
+{
+ "id": "f6199864-45bf-4f82-800d-3d7893dd87a1",
+ "prevId": "edde8c54-b715-4db6-bc3a-85d435226083",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "volumeBackupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'volume'"
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.volumeBackupType": {
+ "name": "volumeBackupType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0100_snapshot.json b/apps/dokploy/drizzle/meta/0100_snapshot.json
new file mode 100644
index 000000000..46432b6a8
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0100_snapshot.json
@@ -0,0 +1,6076 @@
+{
+ "id": "aa5e3660-136e-4e86-9af5-d15f49adf065",
+ "prevId": "f6199864-45bf-4f82-800d-3d7893dd87a1",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "volumeBackupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'volume'"
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "schedule": {
+ "name": "schedule",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.volumeBackupType": {
+ "name": "volumeBackupType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0101_snapshot.json b/apps/dokploy/drizzle/meta/0101_snapshot.json
new file mode 100644
index 000000000..e76acf5bb
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0101_snapshot.json
@@ -0,0 +1,6076 @@
+{
+ "id": "f0506de9-e04d-4e20-a31c-4113d637c137",
+ "prevId": "aa5e3660-136e-4e86-9af5-d15f49adf065",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "volumeBackupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'volume'"
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.volumeBackupType": {
+ "name": "volumeBackupType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0102_snapshot.json b/apps/dokploy/drizzle/meta/0102_snapshot.json
new file mode 100644
index 000000000..41b76f027
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0102_snapshot.json
@@ -0,0 +1,6083 @@
+{
+ "id": "b0457bcf-32a8-4746-ab0f-59b8d3e1920a",
+ "prevId": "f0506de9-e04d-4e20-a31c-4113d637c137",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "volumeBackupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'volume'"
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.volumeBackupType": {
+ "name": "volumeBackupType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0103_snapshot.json b/apps/dokploy/drizzle/meta/0103_snapshot.json
new file mode 100644
index 000000000..fe904bd7d
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0103_snapshot.json
@@ -0,0 +1,6083 @@
+{
+ "id": "e7e4e8f6-ed22-4f91-8fbe-3b2c14ed4928",
+ "prevId": "b0457bcf-32a8-4746-ab0f-59b8d3e1920a",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "volumeBackupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'volume'"
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostPath": {
+ "name": "hostPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ },
+ "public.volumeBackupType": {
+ "name": "volumeBackupType",
+ "schema": "public",
+ "values": [
+ "bind",
+ "volume"
+ ]
+ }
+ },
+ "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 855c90e71..898093564 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -694,6 +694,41 @@
"when": 1751233265357,
"tag": "0098_conscious_chat",
"breakpoints": true
+ },
+ {
+ "idx": 99,
+ "version": "7",
+ "when": 1751256324670,
+ "tag": "0099_eminent_phalanx",
+ "breakpoints": true
+ },
+ {
+ "idx": 100,
+ "version": "7",
+ "when": 1751256405233,
+ "tag": "0100_living_proudstar",
+ "breakpoints": true
+ },
+ {
+ "idx": 101,
+ "version": "7",
+ "when": 1751256432021,
+ "tag": "0101_kind_black_tom",
+ "breakpoints": true
+ },
+ {
+ "idx": 102,
+ "version": "7",
+ "when": 1751256715662,
+ "tag": "0102_lush_ink",
+ "breakpoints": true
+ },
+ {
+ "idx": 103,
+ "version": "7",
+ "when": 1751256796247,
+ "tag": "0103_mean_jimmy_woo",
+ "breakpoints": true
}
]
}
\ No newline at end of file
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 f9ab3bcfa..536b5381d 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -14,6 +14,7 @@ import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
import { ShowPreviewDeployments } from "@/components/dashboard/application/preview-deployments/show-preview-deployments";
import { ShowSchedules } from "@/components/dashboard/application/schedules/show-schedules";
import { UpdateApplication } from "@/components/dashboard/application/update-application";
+import { ShowVolumeBackups } from "@/components/dashboard/application/volume-backups/show-volume-backups";
import { DeleteService } from "@/components/dashboard/compose/delete-service";
import { ContainerFreeMonitoring } from "@/components/dashboard/monitoring/free/container/show-free-container-monitoring";
import { ContainerPaidMonitoring } from "@/components/dashboard/monitoring/paid/container/show-paid-container-monitoring";
@@ -61,7 +62,8 @@ type TabState =
| "deployments"
| "domains"
| "monitoring"
- | "preview-deployments";
+ | "preview-deployments"
+ | "volume-backups";
const Service = (
props: InferGetServerSidePropsType,
@@ -234,6 +236,9 @@ const Service = (
Preview Deployments
Schedules
+
+ Volume Backups
+
Deployments
Logs
{((data?.serverId && isCloud) || !data?.server) && (
@@ -328,6 +333,20 @@ const Service = (
/>
+
+
+
+ {/* */}
+
+
diff --git a/apps/dokploy/server/api/root.ts b/apps/dokploy/server/api/root.ts
index cce8768cc..5b6de7344 100644
--- a/apps/dokploy/server/api/root.ts
+++ b/apps/dokploy/server/api/root.ts
@@ -37,6 +37,7 @@ import { swarmRouter } from "./routers/swarm";
import { userRouter } from "./routers/user";
import { scheduleRouter } from "./routers/schedule";
import { rollbackRouter } from "./routers/rollbacks";
+import { volumeBackupsRouter } from "./routers/volume-backups";
/**
* This is the primary router for your server.
*
@@ -82,6 +83,7 @@ export const appRouter = createTRPCRouter({
organization: organizationRouter,
schedule: scheduleRouter,
rollback: rollbackRouter,
+ volumeBackups: volumeBackupsRouter,
});
// export type definition of API
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
new file mode 100644
index 000000000..906ff3193
--- /dev/null
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -0,0 +1,76 @@
+import {
+ findVolumeBackupById,
+ IS_CLOUD,
+ updateVolumeBackup,
+ removeVolumeBackup,
+ createVolumeBackup,
+} from "@dokploy/server";
+import {
+ createVolumeBackupSchema,
+ updateVolumeBackupSchema,
+ volumeBackups,
+} from "@dokploy/server/db/schema";
+import { z } from "zod";
+import { createTRPCRouter, protectedProcedure } from "../trpc";
+import { db } from "@dokploy/server/db";
+import { eq } from "drizzle-orm";
+
+export const volumeBackupsRouter = createTRPCRouter({
+ list: protectedProcedure
+ .input(
+ z.object({
+ id: z.string().min(1),
+ volumeBackupType: z.enum([
+ "application",
+ "postgres",
+ "mysql",
+ "mariadb",
+ "mongo",
+ "redis",
+ "compose",
+ ]),
+ }),
+ )
+ .query(async ({ input }) => {
+ return await db.query.volumeBackups.findMany({
+ where: eq(volumeBackups[`${input.volumeBackupType}Id`], input.id),
+ });
+ }),
+ create: protectedProcedure
+ .input(createVolumeBackupSchema)
+ .mutation(async ({ input }) => {
+ return await createVolumeBackup(input);
+ }),
+ one: protectedProcedure
+ .input(
+ z.object({
+ volumeBackupId: z.string().min(1),
+ }),
+ )
+ .query(async ({ input }) => {
+ return await findVolumeBackupById(input.volumeBackupId);
+ }),
+ delete: protectedProcedure
+ .input(
+ z.object({
+ volumeBackupId: z.string().min(1),
+ }),
+ )
+ .mutation(async ({ input }) => {
+ if (IS_CLOUD) {
+ return true;
+ }
+ return await removeVolumeBackup(input.volumeBackupId);
+ }),
+ update: protectedProcedure
+ .input(updateVolumeBackupSchema)
+ .mutation(async ({ input }) => {
+ return await updateVolumeBackup(input.volumeBackupId, input);
+ }),
+
+ runManually: protectedProcedure
+ .input(z.object({ volumeBackupId: z.string().min(1) }))
+ .mutation(async ({ input }) => {
+ // return await runVolumeBackupManually(input.volumeBackupId);
+ }),
+});
diff --git a/packages/server/src/db/schema/index.ts b/packages/server/src/db/schema/index.ts
index 439e669ec..820f23182 100644
--- a/packages/server/src/db/schema/index.ts
+++ b/packages/server/src/db/schema/index.ts
@@ -33,3 +33,4 @@ export * from "./ai";
export * from "./account";
export * from "./schedule";
export * from "./rollbacks";
+export * from "./volume-backups";
diff --git a/packages/server/src/db/schema/volume-backups.ts b/packages/server/src/db/schema/volume-backups.ts
new file mode 100644
index 000000000..994172bc7
--- /dev/null
+++ b/packages/server/src/db/schema/volume-backups.ts
@@ -0,0 +1,110 @@
+import { relations } from "drizzle-orm";
+import { boolean, integer, pgEnum, pgTable, text } from "drizzle-orm/pg-core";
+import { createInsertSchema } from "drizzle-zod";
+import { nanoid } from "nanoid";
+import { z } from "zod";
+import { serviceType } from "./mount";
+import { applications } from "./application";
+import { mongo } from "./mongo";
+import { mysql } from "./mysql";
+import { redis } from "./redis";
+import { compose } from "./compose";
+import { postgres } from "./postgres";
+import { mariadb } from "./mariadb";
+import { destinations } from "./destination";
+
+export const volumeBackupType = pgEnum("volumeBackupType", ["bind", "volume"]);
+
+export const volumeBackups = pgTable("volume_backup", {
+ volumeBackupId: text("volumeBackupId")
+ .notNull()
+ .primaryKey()
+ .$defaultFn(() => nanoid()),
+ name: text("name").notNull(),
+ type: volumeBackupType("type").notNull().default("volume"),
+ volumeName: text("volumeName"),
+ hostPath: text("hostPath"),
+ prefix: text("prefix").notNull(),
+ serviceType: serviceType("serviceType").notNull().default("application"),
+ turnOff: boolean("turnOff").notNull().default(false),
+ cronExpression: text("cronExpression").notNull(),
+ keepLatestCount: integer("keepLatestCount"),
+ enabled: boolean("enabled"),
+ applicationId: text("applicationId").references(
+ () => applications.applicationId,
+ {
+ onDelete: "cascade",
+ },
+ ),
+ postgresId: text("postgresId").references(() => postgres.postgresId, {
+ onDelete: "cascade",
+ }),
+ mariadbId: text("mariadbId").references(() => mariadb.mariadbId, {
+ onDelete: "cascade",
+ }),
+ mongoId: text("mongoId").references(() => mongo.mongoId, {
+ onDelete: "cascade",
+ }),
+ mysqlId: text("mysqlId").references(() => mysql.mysqlId, {
+ onDelete: "cascade",
+ }),
+ redisId: text("redisId").references(() => redis.redisId, {
+ onDelete: "cascade",
+ }),
+ composeId: text("composeId").references(() => compose.composeId, {
+ onDelete: "cascade",
+ }),
+ createdAt: text("createdAt")
+ .notNull()
+ .$defaultFn(() => new Date().toISOString()),
+ destinationId: text("destinationId")
+ .notNull()
+ .references(() => destinations.destinationId, { onDelete: "cascade" }),
+});
+
+export type VolumeBackup = typeof volumeBackups.$inferSelect;
+
+export const volumeBackupsRelations = relations(volumeBackups, ({ one }) => ({
+ application: one(applications, {
+ fields: [volumeBackups.applicationId],
+ references: [applications.applicationId],
+ }),
+ postgres: one(postgres, {
+ fields: [volumeBackups.postgresId],
+ references: [postgres.postgresId],
+ }),
+ mariadb: one(mariadb, {
+ fields: [volumeBackups.mariadbId],
+ references: [mariadb.mariadbId],
+ }),
+ mongo: one(mongo, {
+ fields: [volumeBackups.mongoId],
+ references: [mongo.mongoId],
+ }),
+ mysql: one(mysql, {
+ fields: [volumeBackups.mysqlId],
+ references: [mysql.mysqlId],
+ }),
+ redis: one(redis, {
+ fields: [volumeBackups.redisId],
+ references: [redis.redisId],
+ }),
+ compose: one(compose, {
+ fields: [volumeBackups.composeId],
+ references: [compose.composeId],
+ }),
+}));
+
+export const createVolumeBackupSchema = createInsertSchema(
+ volumeBackups,
+).extend({
+ volumeName: z.string().min(1),
+});
+
+export const updateVolumeBackupSchema = createVolumeBackupSchema.extend({
+ volumeBackupId: z.string().min(1),
+});
+
+export const apiFindOneVolumeBackup = z.object({
+ volumeBackupId: z.string().min(1),
+});
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index c2938e23e..624af87ec 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -10,6 +10,7 @@ export * from "./services/mysql";
export * from "./services/backup";
export * from "./services/cluster";
export * from "./services/settings";
+export * from "./services/volume-backups";
export * from "./services/docker";
export * from "./services/destination";
export * from "./services/deployment";
diff --git a/packages/server/src/services/volume-backups.ts b/packages/server/src/services/volume-backups.ts
new file mode 100644
index 000000000..a501b00c1
--- /dev/null
+++ b/packages/server/src/services/volume-backups.ts
@@ -0,0 +1,51 @@
+import { eq } from "drizzle-orm";
+import {
+ type createVolumeBackupSchema,
+ type updateVolumeBackupSchema,
+ volumeBackups,
+} from "../db/schema";
+import { db } from "../db";
+import { TRPCError } from "@trpc/server";
+import type { z } from "zod";
+
+export const findVolumeBackupById = async (volumeBackupId: string) => {
+ const volumeBackup = await db.query.volumeBackups.findFirst({
+ where: eq(volumeBackups.volumeBackupId, volumeBackupId),
+ });
+
+ if (!volumeBackup) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: "Volume backup not found",
+ });
+ }
+
+ return volumeBackup;
+};
+
+export const createVolumeBackup = async (
+ volumeBackup: z.infer
,
+) => {
+ const newVolumeBackup = await db
+ .insert(volumeBackups)
+ .values(volumeBackup)
+ .returning();
+
+ return newVolumeBackup;
+};
+
+export const removeVolumeBackup = async (volumeBackupId: string) => {
+ await db
+ .delete(volumeBackups)
+ .where(eq(volumeBackups.volumeBackupId, volumeBackupId));
+};
+
+export const updateVolumeBackup = async (
+ volumeBackupId: string,
+ volumeBackup: z.infer,
+) => {
+ await db
+ .update(volumeBackups)
+ .set(volumeBackup)
+ .where(eq(volumeBackups.volumeBackupId, volumeBackupId));
+};
From a5bba9a11b1b23a53637537dce9f013b3d600b3d Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 29 Jun 2025 23:05:36 -0600
Subject: [PATCH 15/56] refactor: update volume backup schema and form handling
- Modified the volume backup schema to enforce non-null constraints on volumeName and added serviceName.
- Removed unnecessary fields (type, hostPath) from the schema and updated related API and form handling.
- Enhanced form validation to ensure required fields are properly checked.
- Updated the UI components to reflect changes in the volume backup management interface.
---
.../volume-backups/handle-volume-backups.tsx | 142 +-
.../dokploy/drizzle/0104_robust_nighthawk.sql | 4 +
.../dokploy/drizzle/0105_unknown_firelord.sql | 1 +
apps/dokploy/drizzle/meta/0104_snapshot.json | 6061 ++++++++++++++++
apps/dokploy/drizzle/meta/0105_snapshot.json | 6067 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 14 +
.../server/api/routers/volume-backups.ts | 2 +-
.../server/src/db/schema/volume-backups.ts | 15 +-
8 files changed, 12279 insertions(+), 27 deletions(-)
create mode 100644 apps/dokploy/drizzle/0104_robust_nighthawk.sql
create mode 100644 apps/dokploy/drizzle/0105_unknown_firelord.sql
create mode 100644 apps/dokploy/drizzle/meta/0104_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0105_snapshot.json
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index 14ff498ba..a9e9e6aeb 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -53,16 +53,12 @@ const formSchema = z
.object({
name: z.string().min(1, "Name is required"),
cronExpression: z.string().min(1, "Cron expression is required"),
- volumeName: z.string(),
- hostPath: z.string(),
+ volumeName: z.string().min(1, "Volume name is required"),
prefix: z.string(),
keepLatestCount: z.coerce.number().optional(),
turnOff: z.boolean().default(false),
- volumeBackupType: z.enum(["bind", "volume"]),
enabled: z.boolean().default(true),
- serviceName: z.string(),
- destinationId: z.string().min(1, "Destination required"),
- scheduleType: z.enum([
+ serviceType: z.enum([
"application",
"compose",
"postgres",
@@ -71,9 +67,11 @@ const formSchema = z
"mysql",
"redis",
]),
+ serviceName: z.string(),
+ destinationId: z.string().min(1, "Destination required"),
})
.superRefine((data, ctx) => {
- if (data.scheduleType === "compose" && !data.serviceName) {
+ if (data.serviceType === "compose" && !data.serviceName) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "Service name is required",
@@ -110,18 +108,17 @@ export const HandleVolumeBackups = ({
name: "",
cronExpression: "",
volumeName: "",
- hostPath: "",
prefix: "",
keepLatestCount: undefined,
turnOff: false,
- volumeBackupType: "volume",
enabled: true,
serviceName: "",
+ serviceType: volumeBackupType,
},
});
- const scheduleTypeForm = form.watch("scheduleType");
-
+ const serviceTypeForm = volumeBackupType;
+ const { data: destinations } = api.destination.all.useQuery();
const { data: volumeBackup } = api.volumeBackups.one.useQuery(
{ volumeBackupId: volumeBackupId || "" },
{ enabled: !!volumeBackupId },
@@ -150,14 +147,13 @@ export const HandleVolumeBackups = ({
name: volumeBackup.name,
cronExpression: volumeBackup.cronExpression,
volumeName: volumeBackup.volumeName || "",
- hostPath: volumeBackup.hostPath || "",
prefix: volumeBackup.prefix,
- keepLatestCount: volumeBackup.keepLatestCount,
+ keepLatestCount: volumeBackup.keepLatestCount || undefined,
turnOff: volumeBackup.turnOff,
- volumeBackupType: volumeBackup.type,
- enabled: volumeBackup.enabled,
+ enabled: volumeBackup.enabled || true,
serviceName: volumeBackup.serviceName || "",
destinationId: volumeBackup.destinationId,
+ serviceType: volumeBackup.serviceType,
});
}
}, [form, volumeBackup, volumeBackupId]);
@@ -173,6 +169,7 @@ export const HandleVolumeBackups = ({
...values,
destinationId: values.destinationId,
volumeBackupId: volumeBackupId || "",
+ serviceType: volumeBackupType,
...(volumeBackupType === "application" && {
applicationId: id || "",
}),
@@ -251,7 +248,7 @@ export const HandleVolumeBackups = ({
@@ -109,7 +99,7 @@ export const ShowVolumeBackups = ({
>
-
+
@@ -184,7 +174,7 @@ export const ShowVolumeBackups = ({
{
utils.volumeBackups.list.invalidate({
id,
- volumeBackupType,
+ volumeBackupType: type,
});
toast.success("Volume backup deleted successfully");
})
@@ -230,7 +220,7 @@ export const ShowVolumeBackups = ({
Create your first volume backup to automate your workflows
-
+
)}
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 536b5381d..b396837b1 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -336,15 +336,9 @@ const Service = (
- {/* */}
+ />
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 5eebff64b..7ab6f20a5 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -4,6 +4,7 @@ import { ShowDeployments } from "@/components/dashboard/application/deployments/
import { ShowDomains } from "@/components/dashboard/application/domains/show-domains";
import { ShowEnvironment } from "@/components/dashboard/application/environment/show-enviroment";
import { ShowSchedules } from "@/components/dashboard/application/schedules/show-schedules";
+import { ShowVolumeBackups } from "@/components/dashboard/application/volume-backups/show-volume-backups";
import { AddCommandCompose } from "@/components/dashboard/compose/advanced/add-command";
import { DeleteService } from "@/components/dashboard/compose/delete-service";
import { ShowGeneralCompose } from "@/components/dashboard/compose/general/show";
@@ -57,7 +58,8 @@ type TabState =
| "advanced"
| "deployments"
| "domains"
- | "monitoring";
+ | "monitoring"
+ | "volumeBackups";
const Service = (
props: InferGetServerSidePropsType,
@@ -226,6 +228,9 @@ const Service = (
Deployments
Backups
Schedules
+
+ Volume Backups
+
Logs
{((data?.serverId && isCloud) || !data?.server) && (
Monitoring
@@ -255,7 +260,11 @@ const Service = (
-
+
+
+
+
+
@@ -342,6 +351,7 @@ const Service = (
+
From 12860a0736707e91852dd30e8a4e3de91f3c924b Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 29 Jun 2025 23:18:12 -0600
Subject: [PATCH 19/56] feat: add appName field to volume_backup schema and
enhance deployment volume backup functionality
- Introduced a new appName column in the volume_backup table to improve application identification.
- Updated the volume backup schema to ensure appName is a required field.
- Enhanced the deployment service to support volume backup creation, integrating appName into the deployment process.
- Added validation for volume backup creation to ensure proper handling of appName and related data.
---
.../dokploy/drizzle/0107_brief_the_fallen.sql | 1 +
apps/dokploy/drizzle/meta/0107_snapshot.json | 6092 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
packages/server/src/db/schema/deployment.ts | 11 +
.../server/src/db/schema/volume-backups.ts | 4 +
packages/server/src/services/deployment.ts | 90 +-
.../server/src/services/volume-backups.ts | 9 +
7 files changed, 6212 insertions(+), 2 deletions(-)
create mode 100644 apps/dokploy/drizzle/0107_brief_the_fallen.sql
create mode 100644 apps/dokploy/drizzle/meta/0107_snapshot.json
diff --git a/apps/dokploy/drizzle/0107_brief_the_fallen.sql b/apps/dokploy/drizzle/0107_brief_the_fallen.sql
new file mode 100644
index 000000000..2fa325dc9
--- /dev/null
+++ b/apps/dokploy/drizzle/0107_brief_the_fallen.sql
@@ -0,0 +1 @@
+ALTER TABLE "volume_backup" ADD COLUMN "appName" text NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0107_snapshot.json b/apps/dokploy/drizzle/meta/0107_snapshot.json
new file mode 100644
index 000000000..505c562bb
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0107_snapshot.json
@@ -0,0 +1,6092 @@
+{
+ "id": "5e267f05-3017-4ca8-9921-bf34bb5ddd6a",
+ "prevId": "b63fe208-f84f-4ab0-befa-e943dc1d1538",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 a30ffc508..9e29751eb 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -750,6 +750,13 @@
"when": 1751260111986,
"tag": "0106_furry_gargoyle",
"breakpoints": true
+ },
+ {
+ "idx": 107,
+ "version": "7",
+ "when": 1751260608863,
+ "tag": "0107_brief_the_fallen",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/src/db/schema/deployment.ts b/packages/server/src/db/schema/deployment.ts
index 2cc14f5df..fc2da4cb6 100644
--- a/packages/server/src/db/schema/deployment.ts
+++ b/packages/server/src/db/schema/deployment.ts
@@ -188,6 +188,17 @@ export const apiCreateDeploymentSchedule = schema
scheduleId: z.string().min(1),
});
+export const apiCreateDeploymentVolumeBackup = schema
+ .pick({
+ title: true,
+ status: true,
+ logPath: true,
+ description: true,
+ })
+ .extend({
+ volumeBackupId: z.string().min(1),
+ });
+
export const apiFindAllByApplication = schema
.pick({
applicationId: true,
diff --git a/packages/server/src/db/schema/volume-backups.ts b/packages/server/src/db/schema/volume-backups.ts
index abc79e187..69ab62ca2 100644
--- a/packages/server/src/db/schema/volume-backups.ts
+++ b/packages/server/src/db/schema/volume-backups.ts
@@ -13,6 +13,7 @@ import { postgres } from "./postgres";
import { mariadb } from "./mariadb";
import { destinations } from "./destination";
import { deployments } from "./deployment";
+import { generateAppName } from "./utils";
export const volumeBackups = pgTable("volume_backup", {
volumeBackupId: text("volumeBackupId")
@@ -23,6 +24,9 @@ export const volumeBackups = pgTable("volume_backup", {
volumeName: text("volumeName").notNull(),
prefix: text("prefix").notNull(),
serviceType: serviceType("serviceType").notNull().default("application"),
+ appName: text("appName")
+ .notNull()
+ .$defaultFn(() => generateAppName("volumeBackup")),
serviceName: text("serviceName"),
turnOff: boolean("turnOff").notNull().default(false),
cronExpression: text("cronExpression").notNull(),
diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts
index bc7ef42fa..aff6d7f15 100644
--- a/packages/server/src/services/deployment.ts
+++ b/packages/server/src/services/deployment.ts
@@ -9,6 +9,7 @@ import {
type apiCreateDeploymentPreview,
type apiCreateDeploymentSchedule,
type apiCreateDeploymentServer,
+ type apiCreateDeploymentVolumeBackup,
deployments,
} from "@dokploy/server/db/schema";
import { removeDirectoryIfExistsContent } from "@dokploy/server/utils/filesystem/directory";
@@ -32,6 +33,7 @@ import {
} from "./preview-deployment";
import { findScheduleById } from "./schedule";
import { removeRollbackById } from "./rollbacks";
+import { findVolumeBackupById } from "./volume-backups";
export type Deployment = typeof deployments.$inferSelect;
@@ -458,6 +460,88 @@ export const createDeploymentSchedule = async (
}
};
+export const createDeploymentVolumeBackup = async (
+ deployment: Omit<
+ typeof apiCreateDeploymentVolumeBackup._type,
+ "deploymentId" | "createdAt" | "status" | "logPath"
+ >,
+) => {
+ const volumeBackup = await findVolumeBackupById(deployment.volumeBackupId);
+
+ try {
+ const serverId =
+ volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
+ await removeLastTenDeployments(
+ deployment.volumeBackupId,
+ "volumeBackup",
+ serverId,
+ );
+ const { SCHEDULES_PATH } = paths(!!serverId);
+ const formattedDateTime = format(new Date(), "yyyy-MM-dd:HH:mm:ss");
+ const fileName = `${volumeBackup.appName}-${formattedDateTime}.log`;
+ const logFilePath = path.join(
+ SCHEDULES_PATH,
+ volumeBackup.appName,
+ fileName,
+ );
+
+ if (serverId) {
+ const server = await findServerById(serverId);
+
+ const command = `
+ mkdir -p ${SCHEDULES_PATH}/${volumeBackup.appName};
+ echo "Initializing volume backup" >> ${logFilePath};
+ `;
+
+ await execAsyncRemote(server.serverId, command);
+ } else {
+ await fsPromises.mkdir(path.join(SCHEDULES_PATH, volumeBackup.appName), {
+ recursive: true,
+ });
+ await fsPromises.writeFile(logFilePath, "Initializing volume backup\n");
+ }
+
+ const deploymentCreate = await db
+ .insert(deployments)
+ .values({
+ volumeBackupId: deployment.volumeBackupId,
+ title: deployment.title || "Deployment",
+ status: "running",
+ logPath: logFilePath,
+ description: deployment.description || "",
+ startedAt: new Date().toISOString(),
+ })
+ .returning();
+ if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Error creating the deployment",
+ });
+ }
+ return deploymentCreate[0];
+ } catch (error) {
+ console.log(error);
+ await db
+ .insert(deployments)
+ .values({
+ volumeBackupId: deployment.volumeBackupId,
+ title: deployment.title || "Deployment",
+ status: "error",
+ logPath: "",
+ description: deployment.description || "",
+ errorMessage: `An error have occured: ${error instanceof Error ? error.message : error}`,
+ startedAt: new Date().toISOString(),
+ finishedAt: new Date().toISOString(),
+ })
+ .returning();
+
+ throw new TRPCError({
+ code: "BAD_REQUEST",
+ message: "Error creating the deployment",
+ });
+ }
+};
+
export const removeDeployment = async (deploymentId: string) => {
try {
const deployment = await db
@@ -492,7 +576,8 @@ const getDeploymentsByType = async (
| "server"
| "schedule"
| "previewDeployment"
- | "backup",
+ | "backup"
+ | "volumeBackup",
) => {
const deploymentList = await db.query.deployments.findMany({
where: eq(deployments[`${type}Id`], id),
@@ -524,7 +609,8 @@ const removeLastTenDeployments = async (
| "server"
| "schedule"
| "previewDeployment"
- | "backup",
+ | "backup"
+ | "volumeBackup",
serverId?: string | null,
) => {
const deploymentList = await getDeploymentsByType(id, type);
diff --git a/packages/server/src/services/volume-backups.ts b/packages/server/src/services/volume-backups.ts
index a501b00c1..aad2ef225 100644
--- a/packages/server/src/services/volume-backups.ts
+++ b/packages/server/src/services/volume-backups.ts
@@ -11,6 +11,15 @@ import type { z } from "zod";
export const findVolumeBackupById = async (volumeBackupId: string) => {
const volumeBackup = await db.query.volumeBackups.findFirst({
where: eq(volumeBackups.volumeBackupId, volumeBackupId),
+ with: {
+ application: true,
+ postgres: true,
+ mysql: true,
+ mariadb: true,
+ mongo: true,
+ redis: true,
+ compose: true,
+ },
});
if (!volumeBackup) {
From 819a310d484e43a4dc487f9d8f5684ece4380fb5 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 29 Jun 2025 23:24:44 -0600
Subject: [PATCH 20/56] feat: add volume selection functionality to volume
backup form
- Introduced a new query to fetch named mounts by application ID, enhancing the volume backup form.
- Updated the form to allow users to select a volume from a dropdown, improving user experience.
- Retained the option for manual input of volume names, ensuring flexibility in volume selection.
---
.../volume-backups/handle-volume-backups.tsx | 76 +++++++++++++++----
apps/dokploy/server/api/routers/mount.ts | 14 ++++
2 files changed, 74 insertions(+), 16 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index dbd7c2a1e..04a027cb8 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -132,6 +132,11 @@ export const HandleVolumeBackups = ({
{ enabled: !!volumeBackupId },
);
+ const { data: mounts } = api.mounts.allNamedByApplicationId.useQuery(
+ { applicationId: id || "" },
+ { enabled: !!id },
+ );
+
const {
data: services,
isFetching: isLoadingServices,
@@ -479,22 +484,61 @@ export const HandleVolumeBackups = ({
)}
/>
-
(
-
- Volume Name
-
-
-
-
- The name of the Docker volume to backup
-
-
-
- )}
- />
+ {serviceTypeForm === "application" && (
+ <>
+ (
+
+ Volumes
+
+
+
+
+
+
+
+ {mounts?.map((mount) => (
+
+ {mount.volumeName}
+
+ ))}
+
+
+
+ Choose the volume to backup, if you dont see the volume
+ here, you can type the volume name manually
+
+
+
+ )}
+ />
+
+ (
+
+ Volume Name
+
+
+
+
+ The name of the Docker volume to backup
+
+
+
+ )}
+ />
+ >
+ )}
{
return await updateMount(input.mountId, input);
}),
+ allNamedByApplicationId: protectedProcedure
+ .input(z.object({ applicationId: z.string().min(1) }))
+ .query(async ({ input }) => {
+ return await db.query.mounts.findMany({
+ where: and(
+ eq(mounts.applicationId, input.applicationId),
+ eq(mounts.type, "volume"),
+ ),
+ });
+ }),
});
From c042c8c0c5834bbfc2404334214f56876e2b85f1 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Mon, 30 Jun 2025 01:25:50 -0600
Subject: [PATCH 21/56] feat: implement service-based volume selection for
backups
- Added a new query to load mounts by service name, enhancing the volume backup form's functionality.
- Updated the form to allow users to select a service and corresponding volume from a dropdown, improving user experience.
- Retained the option for manual input of volume names, ensuring flexibility in volume selection.
- Refactored the component to streamline the handling of service and volume selections.
---
.../volume-backups/handle-volume-backups.tsx | 370 ++++++++++--------
apps/dokploy/server/api/routers/compose.ts | 22 ++
.../server/src/utils/volume-backups/utils.ts | 62 +++
3 files changed, 292 insertions(+), 162 deletions(-)
create mode 100644 packages/server/src/utils/volume-backups/utils.ts
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index 04a027cb8..f0f00bd26 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -154,6 +154,18 @@ export const HandleVolumeBackups = ({
},
);
+ const serviceName = form.watch("serviceName");
+
+ const { data: mountsByService } = api.compose.loadMountsByService.useQuery(
+ {
+ composeId: id || "",
+ serviceName,
+ },
+ {
+ enabled: !!id && volumeBackupType === "compose" && !!serviceName,
+ },
+ );
+
useEffect(() => {
if (volumeBackupId && volumeBackup) {
form.reset({
@@ -261,117 +273,6 @@ export const HandleVolumeBackups = ({
+
+ {
+ setIsDrawerOpen(false);
+ setFilteredLogs([]);
+ setIsDeploying(false);
+ // refetch();
+ }}
+ filteredLogs={filteredLogs}
+ />
+
+
+ );
+};
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
index bf823c382..8318b0170 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
@@ -25,6 +25,7 @@ import {
import { toast } from "sonner";
import { HandleVolumeBackups } from "./handle-volume-backups";
import { ShowDeploymentsModal } from "../deployments/show-deployments-modal";
+import { RestoreVolumeBackups } from "./restore-volume-backups";
interface Props {
id: string;
@@ -68,9 +69,14 @@ export const ShowVolumeBackups = ({ id, type = "application" }: Props) => {
- {volumeBackups && volumeBackups.length > 0 && (
-
- )}
+
+ {volumeBackups && volumeBackups.length > 0 && (
+
+ )}
+
+
+
+
@@ -220,7 +226,10 @@ export const ShowVolumeBackups = ({ id, type = "application" }: Props) => {
Create your first volume backup to automate your workflows
-
+
+
+
+
)}
diff --git a/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx b/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
index 7617b510e..b404204ab 100644
--- a/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
@@ -199,7 +199,7 @@ const RestoreBackupSchema = z
}
});
-const formatBytes = (bytes: number): string => {
+export const formatBytes = (bytes: number): string => {
if (bytes === 0) return "0 Bytes";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
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 7ab6f20a5..de9ab94d5 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -216,10 +216,10 @@ const Service = (
className={cn(
"xl:grid xl:w-fit max-md:overflow-y-scroll justify-start",
isCloud && data?.serverId
- ? "xl:grid-cols-9"
+ ? "xl:grid-cols-10"
: data?.serverId
- ? "xl:grid-cols-8"
- : "xl:grid-cols-9",
+ ? "xl:grid-cols-9"
+ : "xl:grid-cols-10",
)}
>
General
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index 77c98bb11..62187a9cb 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -5,6 +5,7 @@ import {
removeVolumeBackup,
createVolumeBackup,
runVolumeBackup,
+ findDestinationById,
} from "@dokploy/server";
import {
createVolumeBackupSchema,
@@ -15,6 +16,8 @@ import { z } from "zod";
import { createTRPCRouter, protectedProcedure } from "../trpc";
import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
+import { restorePostgresBackup } from "@dokploy/server/utils/restore";
+import { observable } from "@trpc/server/observable";
export const volumeBackupsRouter = createTRPCRouter({
list: protectedProcedure
@@ -88,4 +91,29 @@ export const volumeBackupsRouter = createTRPCRouter({
return false;
}
}),
+ restoreVolumeBackupWithLogs: protectedProcedure
+ .meta({
+ openapi: {
+ enabled: false,
+ path: "/restore-volume-backup-with-logs",
+ method: "POST",
+ override: true,
+ },
+ })
+ .input(
+ z.object({
+ volumeBackupId: z.string().min(1),
+ destinationId: z.string().min(1),
+ volumeName: z.string().min(1),
+ }),
+ )
+ .subscription(async ({ input }) => {
+ const destination = await findDestinationById(input.destinationId);
+
+ return observable((emit) => {
+ // restorePostgresBackup(postgres, destination, input, (log) => {
+ // emit.next(log);
+ // });
+ });
+ }),
});
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index dbad12ec0..99b2f7c82 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -97,6 +97,7 @@ const backupVolume = async (
if (compose.composeType === "stack") {
stopCommand = `
echo "Stopping compose to 0 replicas"
+ echo "Service name: ${compose.appName}_${volumeBackup.serviceName}"
ACTUAL_REPLICAS=$(docker service inspect ${compose.appName}_${volumeBackup.serviceName} --format "{{.Spec.Mode.Replicated.Replicas}}")
echo "Actual replicas: $ACTUAL_REPLICAS"
docker service scale ${compose.appName}_${volumeBackup.serviceName}=0`;
From c6d760a90485a573ffd95a841398134edc3eb8f8 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Tue, 1 Jul 2025 01:12:20 -0600
Subject: [PATCH 29/56] fix: update RestoreVolumeBackups and ShowVolumeBackups
components for improved functionality
- Refactored the RestoreVolumeBackups component to ensure the type prop is required and added serverId handling for better integration.
- Corrected variable naming for destinationId in the form handling to prevent potential issues.
- Enhanced the ShowVolumeBackups component to pass serverId to the RestoreVolumeBackups component, ensuring consistent data flow.
- Improved user interface elements for backup file selection, ensuring better usability and clarity.
---
.../volume-backups/restore-volume-backups.tsx | 76 ++--
.../volume-backups/show-volume-backups.tsx | 13 +-
.../database/backups/restore-backup.tsx | 6 +-
.../services/application/[applicationId].tsx | 1 +
.../services/compose/[composeId].tsx | 6 +-
.../server/api/routers/volume-backups.ts | 79 +++-
.../server/src/utils/volume-backups/utils.ts | 361 ++++++++++++++++--
7 files changed, 452 insertions(+), 90 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
index 4c1bc1658..295833a39 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
@@ -47,35 +47,33 @@ import { formatBytes } from "../../database/backups/restore-backup";
interface Props {
id: string;
- type?: "application" | "compose" | "postgres" | "mariadb" | "mongo" | "mysql";
+ type: "application" | "compose";
serverId?: string;
}
-const RestoreBackupSchema = z
- .object({
- destinationId: z
- .string({
- required_error: "Please select a destination",
- })
- .min(1, {
- message: "Destination is required",
- }),
- backupFile: z
- .string({
- required_error: "Please select a backup file",
- })
- .min(1, {
- message: "Backup file is required",
- }),
- volumeName: z
- .string({
- required_error: "Please enter a volume name",
- })
- .min(1, {
- message: "Volume name is required",
- }),
- })
- .superRefine((data, ctx) => {});
+const RestoreBackupSchema = z.object({
+ destinationId: z
+ .string({
+ required_error: "Please select a destination",
+ })
+ .min(1, {
+ message: "Destination is required",
+ }),
+ backupFile: z
+ .string({
+ required_error: "Please select a backup file",
+ })
+ .min(1, {
+ message: "Backup file is required",
+ }),
+ volumeName: z
+ .string({
+ required_error: "Please enter a volume name",
+ })
+ .min(1, {
+ message: "Volume name is required",
+ }),
+});
export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
const [isOpen, setIsOpen] = useState(false);
@@ -93,8 +91,9 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
resolver: zodResolver(RestoreBackupSchema),
});
- const destionationId = form.watch("destinationId");
+ const destinationId = form.watch("destinationId");
const volumeName = form.watch("volumeName");
+ const backupFile = form.watch("backupFile");
const debouncedSetSearch = debounce((value: string) => {
setDebouncedSearchTerm(value);
@@ -107,12 +106,12 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
const { data: files = [], isLoading } = api.backup.listBackupFiles.useQuery(
{
- destinationId: destionationId,
+ destinationId: destinationId,
search: debouncedSearchTerm,
serverId: serverId ?? "",
},
{
- enabled: isOpen && !!destionationId,
+ enabled: isOpen && !!destinationId,
},
);
@@ -122,9 +121,12 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
api.volumeBackups.restoreVolumeBackupWithLogs.useSubscription(
{
- volumeBackupId: id,
- destinationId: form.watch("destinationId"),
- volumeName: volumeName,
+ id,
+ serviceType: type,
+ serverId,
+ destinationId,
+ volumeName,
+ backupFileName: backupFile,
},
{
enabled: isDeploying,
@@ -146,7 +148,7 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
},
);
- const onSubmit = async (data: z.infer) => {
+ const onSubmit = async () => {
setIsDeploying(true);
};
@@ -246,10 +248,10 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
name="backupFile"
render={({ field }) => (
-
+
Search Backup Files
{field.value && (
-
+
{field.value}
{
!field.value && "text-muted-foreground",
)}
>
- {field.value || "Search and select a backup file"}
+
+ {field.value || "Search and select a backup file"}
+
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
index 8318b0170..56223f3bf 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
@@ -29,10 +29,15 @@ import { RestoreVolumeBackups } from "./restore-volume-backups";
interface Props {
id: string;
- type?: "application" | "compose" | "postgres" | "mariadb" | "mongo" | "mysql";
+ type?: "application" | "compose";
+ serverId?: string;
}
-export const ShowVolumeBackups = ({ id, type = "application" }: Props) => {
+export const ShowVolumeBackups = ({
+ id,
+ type = "application",
+ serverId,
+}: Props) => {
const {
data: volumeBackups,
isLoading: isLoadingVolumeBackups,
@@ -74,7 +79,7 @@ export const ShowVolumeBackups = ({ id, type = "application" }: Props) => {
)}
-
+
@@ -228,7 +233,7 @@ export const ShowVolumeBackups = ({ id, type = "application" }: Props) => {
-
+
)}
diff --git a/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx b/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
index b404204ab..76ab7b6cf 100644
--- a/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/restore-backup.tsx
@@ -415,7 +415,7 @@ export const RestoreBackup = ({
Search Backup Files
{field.value && (
-
+
{field.value}
- {field.value || "Search and select a backup file"}
+
+ {field.value || "Search and select a backup file"}
+
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 b396837b1..9817668ab 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/application/[applicationId].tsx
@@ -338,6 +338,7 @@ const Service = (
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 de9ab94d5..40b946d20 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -262,7 +262,11 @@ const Service = (
-
+
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index 62187a9cb..f1eb59b92 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -1,11 +1,10 @@
import {
- findVolumeBackupById,
IS_CLOUD,
updateVolumeBackup,
removeVolumeBackup,
createVolumeBackup,
runVolumeBackup,
- findDestinationById,
+ findVolumeBackupById,
} from "@dokploy/server";
import {
createVolumeBackupSchema,
@@ -16,8 +15,12 @@ import { z } from "zod";
import { createTRPCRouter, protectedProcedure } from "../trpc";
import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
-import { restorePostgresBackup } from "@dokploy/server/utils/restore";
import { observable } from "@trpc/server/observable";
+import { restoreVolume } from "@dokploy/server/utils/volume-backups/utils";
+import {
+ execAsyncRemote,
+ execAsyncStream,
+} from "@dokploy/server/utils/process/execAsync";
export const volumeBackupsRouter = createTRPCRouter({
list: protectedProcedure
@@ -102,18 +105,76 @@ export const volumeBackupsRouter = createTRPCRouter({
})
.input(
z.object({
- volumeBackupId: z.string().min(1),
+ backupFileName: z.string().min(1),
destinationId: z.string().min(1),
volumeName: z.string().min(1),
+ id: z.string().min(1),
+ serviceType: z.enum(["application", "compose"]),
+ serverId: z.string().optional(),
}),
)
.subscription(async ({ input }) => {
- const destination = await findDestinationById(input.destinationId);
-
return observable((emit) => {
- // restorePostgresBackup(postgres, destination, input, (log) => {
- // emit.next(log);
- // });
+ const runRestore = async () => {
+ try {
+ emit.next("🚀 Starting volume restore process...");
+ emit.next(`📂 Backup File: ${input.backupFileName}`);
+ emit.next(`🔧 Volume Name: ${input.volumeName}`);
+ emit.next(`🏷️ Service Type: ${input.serviceType}`);
+ emit.next(""); // Empty line for better readability
+
+ // Generate the restore command
+ const restoreCommand = await restoreVolume(
+ input.id,
+ input.destinationId,
+ input.volumeName,
+ input.backupFileName,
+ input.serverId || "",
+ input.serviceType,
+ );
+
+ emit.next("📋 Generated restore command:");
+ emit.next("▶️ Executing restore...");
+ emit.next(""); // Empty line
+
+ // Execute the restore command with real-time output
+ if (input.serverId) {
+ emit.next(`🌐 Executing on remote server: ${input.serverId}`);
+ await execAsyncRemote(input.serverId, restoreCommand, (data) => {
+ emit.next(data);
+ });
+ } else {
+ emit.next("🖥️ Executing on local server");
+ await execAsyncStream(restoreCommand, (data) => {
+ emit.next(data);
+ });
+ }
+
+ emit.next("");
+ emit.next("✅ Volume restore completed successfully!");
+ emit.next(
+ "🎉 All containers/services have been restarted with the restored volume.",
+ );
+ } catch (error) {
+ emit.next("");
+ emit.next("❌ Volume restore failed!");
+ emit.next(
+ `💥 Error: ${error instanceof Error ? error.message : "Unknown error"}`,
+ );
+
+ if (error instanceof Error && error.stack) {
+ emit.next("📋 Stack trace:");
+ for (const line of error.stack.split("\n")) {
+ if (line.trim()) emit.next(` ${line}`);
+ }
+ }
+ } finally {
+ emit.complete();
+ }
+ };
+
+ // Start the restore process
+ runRestore();
});
}),
});
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index 99b2f7c82..5fb2292a3 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -3,7 +3,9 @@ import {
createDeploymentVolumeBackup,
execAsync,
execAsyncRemote,
+ findApplicationById,
findComposeById,
+ findDestinationById,
getS3Credentials,
normalizeS3Path,
paths,
@@ -122,55 +124,338 @@ const backupVolume = async (
};
export const restoreVolume = async (
- volumeBackup: Awaited>,
+ id: string,
+ destinationId: string,
+ volumeName: string,
+ backupFileName: string,
+ serverId: string,
+ serviceType: "application" | "compose",
) => {
- const { serviceType, volumeName } = volumeBackup;
-
- const serverId =
- volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
+ const destination = await findDestinationById(destinationId);
const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
- const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeBackup.appName);
+ const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeName);
+ const rcloneFlags = getS3Credentials(destination);
+ const bucketPath = `:s3:${destination.bucket}`;
+ const backupPath = `${bucketPath}/${backupFileName}`;
- const baseCommand = `
+ // Command to download backup file from S3
+ const downloadCommand = `rclone copyto ${rcloneFlags.join(" ")} "${backupPath}" "${volumeBackupPath}/${backupFileName}"`;
+
+ // Base restore command that creates the volume and restores data
+ const baseRestoreCommand = `
set -e
- docker volume rm ${volumeName} --force
- echo "Volume name: ${volumeName}"
- echo "Volume backup path: ${volumeBackupPath}"
- echo "Starting volume restore"
-docker run --rm \
--v ${volumeName}:/volume_data \
--v ${volumeBackupPath}:/backup \
-ubuntu \
-bash -c "cd /volume_data && tar xvf /backup/${volumeName}.tar ."
- `;
+ echo "Volume name: ${volumeName}"
+ echo "Backup file name: ${backupFileName}"
+ echo "Volume backup path: ${volumeBackupPath}"
+ echo "Downloading backup from S3..."
+ mkdir -p ${volumeBackupPath}
+ ${downloadCommand}
+ echo "Download completed ✅"
+ echo "Creating new volume and restoring data..."
+ docker run --rm \
+ -v ${volumeName}:/volume_data \
+ -v ${volumeBackupPath}:/backup \
+ ubuntu \
+ bash -c "cd /volume_data && tar xvf /backup/${backupFileName} ."
+ echo "Volume restore completed ✅"
+ `;
+
+ // Function to check if volume exists and get containers using it
+ const checkVolumeCommand = `
+ # Check if volume exists
+ VOLUME_EXISTS=$(docker volume ls -q --filter name="^${volumeName}$" | wc -l)
+ echo "Volume exists: $VOLUME_EXISTS"
+
+ if [ "$VOLUME_EXISTS" = "0" ]; then
+ echo "Volume doesn't exist, proceeding with direct restore"
+ ${baseRestoreCommand}
+ else
+ echo "Volume exists, checking for containers using it (including stopped ones)..."
+
+ # Get ALL containers (running and stopped) using this volume - much simpler with native filter!
+ CONTAINERS_USING_VOLUME=$(docker ps -a --filter "volume=${volumeName}" --format "{{.ID}}|{{.Names}}|{{.State}}|{{.Labels}}")
+
+ if [ -z "$CONTAINERS_USING_VOLUME" ]; then
+ echo "Volume exists but no containers are using it"
+ echo "Removing existing volume and proceeding with restore"
+ docker volume rm ${volumeName} --force
+ ${baseRestoreCommand}
+ else
+ echo "Found containers using the volume:"
+ echo "$CONTAINERS_USING_VOLUME"
+
+ # Collect unique services and containers to stop
+ echo "=== PHASE 1: Stopping all containers/services using the volume ==="
+
+ SERVICES_TO_RESTORE=""
+ CONTAINERS_TO_RESTORE=""
+
+ echo "$CONTAINERS_USING_VOLUME" | while IFS='|' read container_id container_name container_state labels; do
+ echo "Analyzing container: $container_id ($container_name) - State: $container_state"
+
+ # Check if it's a swarm service
+ if echo "$labels" | grep -q "com.docker.swarm.service.name="; then
+ SERVICE_NAME=$(echo "$labels" | grep -o "com.docker.swarm.service.name=[^,]*" | cut -d'=' -f2)
+
+ # Check if we already processed this service
+ if ! echo "$SERVICES_TO_RESTORE" | grep -q "SWARM:$SERVICE_NAME"; then
+ echo "SWARM:$SERVICE_NAME" >> /tmp/dokploy_services_to_stop
+ echo "Will stop swarm service: $SERVICE_NAME"
+ fi
+
+ # Check if it's a compose container
+ elif echo "$labels" | grep -q "com.docker.compose.project="; then
+ PROJECT_NAME=$(echo "$labels" | grep -o "com.docker.compose.project=[^,]*" | cut -d'=' -f2)
+ SERVICE_NAME_COMPOSE=$(echo "$labels" | grep -o "com.docker.compose.service=[^,]*" | cut -d'=' -f2 || echo "")
+
+ # Check if it's a compose stack (swarm mode) or regular compose
+ if echo "$labels" | grep -q "com.docker.stack.namespace="; then
+ STACK_SERVICE_NAME="$PROJECT_NAME"_"$SERVICE_NAME_COMPOSE"
+
+ # Check if we already processed this stack service
+ if ! echo "$SERVICES_TO_RESTORE" | grep -q "STACK:$STACK_SERVICE_NAME"; then
+ echo "STACK:$STACK_SERVICE_NAME" >> /tmp/dokploy_services_to_stop
+ echo "Will stop compose stack service: $STACK_SERVICE_NAME"
+ fi
+ else
+ echo "COMPOSE:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_stop
+ echo "Will stop compose container: $container_id ($container_name)"
+ fi
+ else
+ echo "REGULAR:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_stop
+ echo "Will stop regular container: $container_id ($container_name)"
+ fi
+ done
+
+ # Now stop all services and containers
+ if [ -f /tmp/dokploy_services_to_stop ]; then
+ echo ""
+ echo "=== STOPPING ALL SERVICES/CONTAINERS ==="
+
+ while read line; do
+ TYPE=$(echo "$line" | cut -d':' -f1)
+ DATA=$(echo "$line" | cut -d':' -f2-)
+
+ if [ "$TYPE" = "SWARM" ]; then
+ SERVICE_NAME="$DATA"
+ echo "Stopping swarm service: $SERVICE_NAME"
+
+ # Get current replicas and store for later
+ ACTUAL_REPLICAS=$(docker service inspect "$SERVICE_NAME" --format "{{.Spec.Mode.Replicated.Replicas}}" 2>/dev/null || echo "0")
+ echo "SWARM:$SERVICE_NAME:$ACTUAL_REPLICAS" >> /tmp/dokploy_services_to_restore
+
+ # Scale down to 0 if not already
+ if [ "$ACTUAL_REPLICAS" != "0" ]; then
+ echo "Scaling service $SERVICE_NAME to 0 replicas (was $ACTUAL_REPLICAS)"
+ docker service scale "$SERVICE_NAME=0"
+ else
+ echo "Service $SERVICE_NAME is already scaled to 0"
+ fi
+
+ elif [ "$TYPE" = "STACK" ]; then
+ STACK_SERVICE_NAME="$DATA"
+ echo "Stopping compose stack service: $STACK_SERVICE_NAME"
+
+ # Get current replicas and store for later
+ ACTUAL_REPLICAS=$(docker service inspect "$STACK_SERVICE_NAME" --format "{{.Spec.Mode.Replicated.Replicas}}" 2>/dev/null || echo "0")
+ echo "STACK:$STACK_SERVICE_NAME:$ACTUAL_REPLICAS" >> /tmp/dokploy_services_to_restore
+
+ # Scale down to 0 if not already
+ if [ "$ACTUAL_REPLICAS" != "0" ]; then
+ echo "Scaling stack service $STACK_SERVICE_NAME to 0 replicas (was $ACTUAL_REPLICAS)"
+ docker service scale "$STACK_SERVICE_NAME=0"
+ else
+ echo "Stack service $STACK_SERVICE_NAME is already scaled to 0"
+ fi
+
+ elif [ "$TYPE" = "COMPOSE" ]; then
+ container_id=$(echo "$DATA" | cut -d'|' -f1)
+ container_name=$(echo "$DATA" | cut -d'|' -f2)
+ container_state=$(echo "$DATA" | cut -d'|' -f3)
+
+ echo "COMPOSE:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_restore
+
+ # Stop the container if running
+ if [ "$container_state" = "running" ]; then
+ echo "Stopping compose container: $container_id ($container_name)"
+ docker stop "$container_id"
+ else
+ echo "Compose container $container_id is already stopped"
+ fi
+
+ elif [ "$TYPE" = "REGULAR" ]; then
+ container_id=$(echo "$DATA" | cut -d'|' -f1)
+ container_name=$(echo "$DATA" | cut -d'|' -f2)
+ container_state=$(echo "$DATA" | cut -d'|' -f3)
+
+ echo "REGULAR:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_restore
+
+ # Stop the container if running
+ if [ "$container_state" = "running" ]; then
+ echo "Stopping regular container: $container_id ($container_name)"
+ docker stop "$container_id"
+ else
+ echo "Regular container $container_id is already stopped"
+ fi
+ fi
+ done < /tmp/dokploy_services_to_stop
+
+ # Wait for all services to scale down
+ echo ""
+ echo "=== WAITING FOR ALL SERVICES TO STOP ==="
+ echo "Waiting for all containers to be fully removed..."
+ sleep 10
+
+ # Verify all swarm services are scaled down
+ if grep -q "SWARM:" /tmp/dokploy_services_to_restore 2>/dev/null; then
+ echo "Verifying swarm services are scaled down..."
+ grep "SWARM:" /tmp/dokploy_services_to_restore | while read line; do
+ SERVICE_NAME=$(echo "$line" | cut -d':' -f2)
+ while [ $(docker service ps "$SERVICE_NAME" --filter "desired-state=running" -q 2>/dev/null | wc -l) -gt 0 ]; do
+ echo "Still waiting for swarm service $SERVICE_NAME to scale down..."
+ sleep 3
+ done
+ echo "Swarm service $SERVICE_NAME is fully scaled down"
+ done
+ fi
+
+ # Verify all stack services are scaled down
+ if grep -q "STACK:" /tmp/dokploy_services_to_restore 2>/dev/null; then
+ echo "Verifying stack services are scaled down..."
+ grep "STACK:" /tmp/dokploy_services_to_restore | while read line; do
+ STACK_SERVICE_NAME=$(echo "$line" | cut -d':' -f2)
+ while [ $(docker service ps "$STACK_SERVICE_NAME" --filter "desired-state=running" -q 2>/dev/null | wc -l) -gt 0 ]; do
+ echo "Still waiting for stack service $STACK_SERVICE_NAME to scale down..."
+ sleep 3
+ done
+ echo "Stack service $STACK_SERVICE_NAME is fully scaled down"
+ done
+ fi
+
+ echo ""
+ echo "=== REMOVING STOPPED SWARM CONTAINERS USING THE VOLUME ==="
+
+ # Only remove stopped containers that belong to Swarm services
+ # Regular containers and compose containers should NOT be removed since they can't be recreated automatically
+ SWARM_STOPPED_CONTAINERS=$(docker ps -a --filter "status=exited" --format "{{.ID}} {{.Names}} {{.Labels}}" | while read line; do
+ container_id=$(echo "$line" | awk '{print $1}')
+ container_name=$(echo "$line" | awk '{print $2}')
+ labels=$(echo "$line" | cut -d' ' -f3-)
+
+ # Check if this container uses the volume
+ volume_used=$(docker inspect "$container_id" --format '{{range .Mounts}}{{.Name}} {{end}}' 2>/dev/null | grep -w "${volumeName}" || true)
+
+ # Only include if it uses the volume AND belongs to a Swarm service
+ if [ -n "$volume_used" ] && echo "$labels" | grep -q "com.docker.swarm.service.name="; then
+ echo "$container_id"
+ fi
+ done)
+
+ if [ -n "$SWARM_STOPPED_CONTAINERS" ]; then
+ echo "Found stopped Swarm containers using the volume that need to be removed:"
+ echo "$SWARM_STOPPED_CONTAINERS"
+
+ echo "$SWARM_STOPPED_CONTAINERS" | while read container_id; do
+ if [ -n "$container_id" ]; then
+ echo "Removing stopped Swarm container: $container_id"
+ docker rm "$container_id" --force
+ fi
+ done
+
+ echo "All stopped Swarm containers using the volume have been removed"
+ else
+ echo "No stopped Swarm containers using the volume found"
+ fi
+
+ echo "Note: Regular containers and compose containers are preserved and will be restarted later"
+
+ echo ""
+ echo "=== PHASE 2: All containers/services stopped - Proceeding with volume restore ==="
+
+ # Remove volume and restore - ONLY ONCE!
+ echo "Removing existing volume: ${volumeName}"
+ docker volume rm ${volumeName} --force
+
+ ${baseRestoreCommand}
+
+ echo ""
+ echo "=== PHASE 3: Restarting all services/containers ==="
+
+ # Restore all services and containers
+ while read line; do
+ TYPE=$(echo "$line" | cut -d':' -f1)
+ DATA=$(echo "$line" | cut -d':' -f2-)
+
+ if [ "$TYPE" = "SWARM" ]; then
+ SERVICE_NAME=$(echo "$DATA" | cut -d':' -f1)
+ REPLICAS=$(echo "$DATA" | cut -d':' -f2)
+
+ if [ "$REPLICAS" != "0" ]; then
+ echo "Scaling swarm service $SERVICE_NAME back to $REPLICAS replicas"
+ docker service scale "$SERVICE_NAME=$REPLICAS"
+ else
+ echo "Leaving swarm service $SERVICE_NAME at 0 replicas (was already 0)"
+ fi
+
+ elif [ "$TYPE" = "STACK" ]; then
+ STACK_SERVICE_NAME=$(echo "$DATA" | cut -d':' -f1)
+ REPLICAS=$(echo "$DATA" | cut -d':' -f2)
+
+ if [ "$REPLICAS" != "0" ]; then
+ echo "Scaling stack service $STACK_SERVICE_NAME back to $REPLICAS replicas"
+ docker service scale "$STACK_SERVICE_NAME=$REPLICAS"
+ else
+ echo "Leaving stack service $STACK_SERVICE_NAME at 0 replicas (was already 0)"
+ fi
+
+ elif [ "$TYPE" = "COMPOSE" ]; then
+ container_id=$(echo "$DATA" | cut -d'|' -f1)
+ container_name=$(echo "$DATA" | cut -d'|' -f2)
+
+ echo "Starting compose container: $container_id ($container_name)"
+ docker start "$container_id"
+
+ elif [ "$TYPE" = "REGULAR" ]; then
+ container_id=$(echo "$DATA" | cut -d'|' -f1)
+ container_name=$(echo "$DATA" | cut -d'|' -f2)
+
+ echo "Starting regular container: $container_id ($container_name)"
+ docker start "$container_id"
+ fi
+ done < /tmp/dokploy_services_to_restore
+
+ echo ""
+ echo "✅ Volume restore completed successfully!"
+ echo "✅ All services and containers have been restarted!"
+
+ # Clean up temp files
+ rm -f /tmp/dokploy_services_to_stop
+ rm -f /tmp/dokploy_services_to_restore
+ fi
+ fi
+ fi
+ `;
if (serviceType === "application") {
+ const application = await findApplicationById(id);
return `
- docker service scale ${volumeBackup.application?.appName}=0
- ${baseCommand}
- ACTUAL_REPLICAS=$(docker service inspect ${volumeBackup.application?.appName} --format "{{.Spec.Mode.Replicated.Replicas}}")
- docker service scale ${volumeBackup.application?.appName}=$ACTUAL_REPLICAS
- `;
+ echo "=== VOLUME RESTORE FOR APPLICATION ==="
+ echo "Application: ${application.appName}"
+ ${checkVolumeCommand}
+ `;
}
if (serviceType === "compose") {
- const compose = await findComposeById(
- volumeBackup.compose?.composeId || "",
- );
+ const compose = await findComposeById(id);
- if (compose.composeType === "stack") {
- return `
- ACTUAL_REPLICAS=$(docker service inspect ${compose.appName}_${volumeBackup.serviceName} --format "{{.Spec.Mode.Replicated.Replicas}}")
- docker service scale ${compose.appName}_${volumeBackup.serviceName}=0
- ${baseCommand}
- docker service scale ${compose.appName}_${volumeBackup.serviceName}=$ACTUAL_REPLICAS
- `;
- }
return `
- ID=$(docker ps -q --filter "label=com.docker.compose.project=${compose.appName}" --filter "label=com.docker.compose.service=${volumeBackup.serviceName}")
- docker stop $ID
- ${baseCommand}
- docker start $ID
- `;
+ echo "=== VOLUME RESTORE FOR COMPOSE ==="
+ echo "Compose: ${compose.appName}"
+ echo "Compose Type: ${compose.composeType}"
+ ${checkVolumeCommand}
+ `;
}
+
+ // Fallback for unknown service types
+ return checkVolumeCommand;
};
From 934ec9b16aa7367e6c1b79b510c68b292c3bbcec Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Tue, 1 Jul 2025 01:21:54 -0600
Subject: [PATCH 30/56] fix: improve error handling during volume restoration
process
- Simplified error handling in the volume restoration logic by removing detailed error messages and stack traces.
- Updated user feedback to provide clearer instructions when a volume is in use, enhancing the user experience during restoration attempts.
- Ensured that the restoration process aborts gracefully with informative messages when prerequisites are not met.
---
.../server/api/routers/volume-backups.ts | 12 +-
.../server/src/utils/volume-backups/utils.ts | 261 ++----------------
2 files changed, 22 insertions(+), 251 deletions(-)
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index f1eb59b92..3fdfe7de3 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -155,19 +155,9 @@ export const volumeBackupsRouter = createTRPCRouter({
emit.next(
"🎉 All containers/services have been restarted with the restored volume.",
);
- } catch (error) {
+ } catch {
emit.next("");
emit.next("❌ Volume restore failed!");
- emit.next(
- `💥 Error: ${error instanceof Error ? error.message : "Unknown error"}`,
- );
-
- if (error instanceof Error && error.stack) {
- emit.next("📋 Stack trace:");
- for (const line of error.stack.split("\n")) {
- if (line.trim()) emit.next(` ${line}`);
- }
- }
} finally {
emit.complete();
}
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index 5fb2292a3..da49fa5fd 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -181,257 +181,38 @@ export const restoreVolume = async (
docker volume rm ${volumeName} --force
${baseRestoreCommand}
else
- echo "Found containers using the volume:"
- echo "$CONTAINERS_USING_VOLUME"
-
- # Collect unique services and containers to stop
- echo "=== PHASE 1: Stopping all containers/services using the volume ==="
-
- SERVICES_TO_RESTORE=""
- CONTAINERS_TO_RESTORE=""
+ echo ""
+ echo "⚠️ WARNING: Cannot restore volume as it is currently in use!"
+ echo ""
+ echo "📋 The following containers are using volume '${volumeName}':"
+ echo ""
echo "$CONTAINERS_USING_VOLUME" | while IFS='|' read container_id container_name container_state labels; do
- echo "Analyzing container: $container_id ($container_name) - State: $container_state"
+ echo " 🐳 Container: $container_name ($container_id)"
+ echo " Status: $container_state"
- # Check if it's a swarm service
+ # Determine container type
if echo "$labels" | grep -q "com.docker.swarm.service.name="; then
SERVICE_NAME=$(echo "$labels" | grep -o "com.docker.swarm.service.name=[^,]*" | cut -d'=' -f2)
-
- # Check if we already processed this service
- if ! echo "$SERVICES_TO_RESTORE" | grep -q "SWARM:$SERVICE_NAME"; then
- echo "SWARM:$SERVICE_NAME" >> /tmp/dokploy_services_to_stop
- echo "Will stop swarm service: $SERVICE_NAME"
- fi
-
- # Check if it's a compose container
+ echo " Type: Docker Swarm Service ($SERVICE_NAME)"
elif echo "$labels" | grep -q "com.docker.compose.project="; then
PROJECT_NAME=$(echo "$labels" | grep -o "com.docker.compose.project=[^,]*" | cut -d'=' -f2)
- SERVICE_NAME_COMPOSE=$(echo "$labels" | grep -o "com.docker.compose.service=[^,]*" | cut -d'=' -f2 || echo "")
-
- # Check if it's a compose stack (swarm mode) or regular compose
- if echo "$labels" | grep -q "com.docker.stack.namespace="; then
- STACK_SERVICE_NAME="$PROJECT_NAME"_"$SERVICE_NAME_COMPOSE"
-
- # Check if we already processed this stack service
- if ! echo "$SERVICES_TO_RESTORE" | grep -q "STACK:$STACK_SERVICE_NAME"; then
- echo "STACK:$STACK_SERVICE_NAME" >> /tmp/dokploy_services_to_stop
- echo "Will stop compose stack service: $STACK_SERVICE_NAME"
- fi
- else
- echo "COMPOSE:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_stop
- echo "Will stop compose container: $container_id ($container_name)"
- fi
+ echo " Type: Docker Compose ($PROJECT_NAME)"
else
- echo "REGULAR:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_stop
- echo "Will stop regular container: $container_id ($container_name)"
+ echo " Type: Regular Container"
fi
+ echo ""
done
- # Now stop all services and containers
- if [ -f /tmp/dokploy_services_to_stop ]; then
- echo ""
- echo "=== STOPPING ALL SERVICES/CONTAINERS ==="
-
- while read line; do
- TYPE=$(echo "$line" | cut -d':' -f1)
- DATA=$(echo "$line" | cut -d':' -f2-)
-
- if [ "$TYPE" = "SWARM" ]; then
- SERVICE_NAME="$DATA"
- echo "Stopping swarm service: $SERVICE_NAME"
-
- # Get current replicas and store for later
- ACTUAL_REPLICAS=$(docker service inspect "$SERVICE_NAME" --format "{{.Spec.Mode.Replicated.Replicas}}" 2>/dev/null || echo "0")
- echo "SWARM:$SERVICE_NAME:$ACTUAL_REPLICAS" >> /tmp/dokploy_services_to_restore
-
- # Scale down to 0 if not already
- if [ "$ACTUAL_REPLICAS" != "0" ]; then
- echo "Scaling service $SERVICE_NAME to 0 replicas (was $ACTUAL_REPLICAS)"
- docker service scale "$SERVICE_NAME=0"
- else
- echo "Service $SERVICE_NAME is already scaled to 0"
- fi
-
- elif [ "$TYPE" = "STACK" ]; then
- STACK_SERVICE_NAME="$DATA"
- echo "Stopping compose stack service: $STACK_SERVICE_NAME"
-
- # Get current replicas and store for later
- ACTUAL_REPLICAS=$(docker service inspect "$STACK_SERVICE_NAME" --format "{{.Spec.Mode.Replicated.Replicas}}" 2>/dev/null || echo "0")
- echo "STACK:$STACK_SERVICE_NAME:$ACTUAL_REPLICAS" >> /tmp/dokploy_services_to_restore
-
- # Scale down to 0 if not already
- if [ "$ACTUAL_REPLICAS" != "0" ]; then
- echo "Scaling stack service $STACK_SERVICE_NAME to 0 replicas (was $ACTUAL_REPLICAS)"
- docker service scale "$STACK_SERVICE_NAME=0"
- else
- echo "Stack service $STACK_SERVICE_NAME is already scaled to 0"
- fi
-
- elif [ "$TYPE" = "COMPOSE" ]; then
- container_id=$(echo "$DATA" | cut -d'|' -f1)
- container_name=$(echo "$DATA" | cut -d'|' -f2)
- container_state=$(echo "$DATA" | cut -d'|' -f3)
-
- echo "COMPOSE:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_restore
-
- # Stop the container if running
- if [ "$container_state" = "running" ]; then
- echo "Stopping compose container: $container_id ($container_name)"
- docker stop "$container_id"
- else
- echo "Compose container $container_id is already stopped"
- fi
-
- elif [ "$TYPE" = "REGULAR" ]; then
- container_id=$(echo "$DATA" | cut -d'|' -f1)
- container_name=$(echo "$DATA" | cut -d'|' -f2)
- container_state=$(echo "$DATA" | cut -d'|' -f3)
-
- echo "REGULAR:$container_id|$container_name|$container_state" >> /tmp/dokploy_services_to_restore
-
- # Stop the container if running
- if [ "$container_state" = "running" ]; then
- echo "Stopping regular container: $container_id ($container_name)"
- docker stop "$container_id"
- else
- echo "Regular container $container_id is already stopped"
- fi
- fi
- done < /tmp/dokploy_services_to_stop
-
- # Wait for all services to scale down
- echo ""
- echo "=== WAITING FOR ALL SERVICES TO STOP ==="
- echo "Waiting for all containers to be fully removed..."
- sleep 10
-
- # Verify all swarm services are scaled down
- if grep -q "SWARM:" /tmp/dokploy_services_to_restore 2>/dev/null; then
- echo "Verifying swarm services are scaled down..."
- grep "SWARM:" /tmp/dokploy_services_to_restore | while read line; do
- SERVICE_NAME=$(echo "$line" | cut -d':' -f2)
- while [ $(docker service ps "$SERVICE_NAME" --filter "desired-state=running" -q 2>/dev/null | wc -l) -gt 0 ]; do
- echo "Still waiting for swarm service $SERVICE_NAME to scale down..."
- sleep 3
- done
- echo "Swarm service $SERVICE_NAME is fully scaled down"
- done
- fi
-
- # Verify all stack services are scaled down
- if grep -q "STACK:" /tmp/dokploy_services_to_restore 2>/dev/null; then
- echo "Verifying stack services are scaled down..."
- grep "STACK:" /tmp/dokploy_services_to_restore | while read line; do
- STACK_SERVICE_NAME=$(echo "$line" | cut -d':' -f2)
- while [ $(docker service ps "$STACK_SERVICE_NAME" --filter "desired-state=running" -q 2>/dev/null | wc -l) -gt 0 ]; do
- echo "Still waiting for stack service $STACK_SERVICE_NAME to scale down..."
- sleep 3
- done
- echo "Stack service $STACK_SERVICE_NAME is fully scaled down"
- done
- fi
-
- echo ""
- echo "=== REMOVING STOPPED SWARM CONTAINERS USING THE VOLUME ==="
-
- # Only remove stopped containers that belong to Swarm services
- # Regular containers and compose containers should NOT be removed since they can't be recreated automatically
- SWARM_STOPPED_CONTAINERS=$(docker ps -a --filter "status=exited" --format "{{.ID}} {{.Names}} {{.Labels}}" | while read line; do
- container_id=$(echo "$line" | awk '{print $1}')
- container_name=$(echo "$line" | awk '{print $2}')
- labels=$(echo "$line" | cut -d' ' -f3-)
-
- # Check if this container uses the volume
- volume_used=$(docker inspect "$container_id" --format '{{range .Mounts}}{{.Name}} {{end}}' 2>/dev/null | grep -w "${volumeName}" || true)
-
- # Only include if it uses the volume AND belongs to a Swarm service
- if [ -n "$volume_used" ] && echo "$labels" | grep -q "com.docker.swarm.service.name="; then
- echo "$container_id"
- fi
- done)
-
- if [ -n "$SWARM_STOPPED_CONTAINERS" ]; then
- echo "Found stopped Swarm containers using the volume that need to be removed:"
- echo "$SWARM_STOPPED_CONTAINERS"
-
- echo "$SWARM_STOPPED_CONTAINERS" | while read container_id; do
- if [ -n "$container_id" ]; then
- echo "Removing stopped Swarm container: $container_id"
- docker rm "$container_id" --force
- fi
- done
-
- echo "All stopped Swarm containers using the volume have been removed"
- else
- echo "No stopped Swarm containers using the volume found"
- fi
-
- echo "Note: Regular containers and compose containers are preserved and will be restarted later"
-
- echo ""
- echo "=== PHASE 2: All containers/services stopped - Proceeding with volume restore ==="
-
- # Remove volume and restore - ONLY ONCE!
- echo "Removing existing volume: ${volumeName}"
- docker volume rm ${volumeName} --force
-
- ${baseRestoreCommand}
-
- echo ""
- echo "=== PHASE 3: Restarting all services/containers ==="
-
- # Restore all services and containers
- while read line; do
- TYPE=$(echo "$line" | cut -d':' -f1)
- DATA=$(echo "$line" | cut -d':' -f2-)
-
- if [ "$TYPE" = "SWARM" ]; then
- SERVICE_NAME=$(echo "$DATA" | cut -d':' -f1)
- REPLICAS=$(echo "$DATA" | cut -d':' -f2)
-
- if [ "$REPLICAS" != "0" ]; then
- echo "Scaling swarm service $SERVICE_NAME back to $REPLICAS replicas"
- docker service scale "$SERVICE_NAME=$REPLICAS"
- else
- echo "Leaving swarm service $SERVICE_NAME at 0 replicas (was already 0)"
- fi
-
- elif [ "$TYPE" = "STACK" ]; then
- STACK_SERVICE_NAME=$(echo "$DATA" | cut -d':' -f1)
- REPLICAS=$(echo "$DATA" | cut -d':' -f2)
-
- if [ "$REPLICAS" != "0" ]; then
- echo "Scaling stack service $STACK_SERVICE_NAME back to $REPLICAS replicas"
- docker service scale "$STACK_SERVICE_NAME=$REPLICAS"
- else
- echo "Leaving stack service $STACK_SERVICE_NAME at 0 replicas (was already 0)"
- fi
-
- elif [ "$TYPE" = "COMPOSE" ]; then
- container_id=$(echo "$DATA" | cut -d'|' -f1)
- container_name=$(echo "$DATA" | cut -d'|' -f2)
-
- echo "Starting compose container: $container_id ($container_name)"
- docker start "$container_id"
-
- elif [ "$TYPE" = "REGULAR" ]; then
- container_id=$(echo "$DATA" | cut -d'|' -f1)
- container_name=$(echo "$DATA" | cut -d'|' -f2)
-
- echo "Starting regular container: $container_id ($container_name)"
- docker start "$container_id"
- fi
- done < /tmp/dokploy_services_to_restore
-
- echo ""
- echo "✅ Volume restore completed successfully!"
- echo "✅ All services and containers have been restarted!"
-
- # Clean up temp files
- rm -f /tmp/dokploy_services_to_stop
- rm -f /tmp/dokploy_services_to_restore
- fi
+ echo ""
+ echo "🔧 To restore this volume, please:"
+ echo " 1. Stop all containers/services using this volume"
+ echo " 2. Remove the existing volume: docker volume rm ${volumeName}"
+ echo " 3. Run the restore operation again"
+ echo ""
+ echo "❌ Volume restore aborted - volume is in use"
+
+ exit 1
fi
fi
`;
From b272f01a1885122c9fc6d83ddeba4b302188471d Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Tue, 1 Jul 2025 23:48:19 -0600
Subject: [PATCH 31/56] fix: update volume backup components for improved
functionality
- Refactored HandleVolumeBackups to use consistent naming for mount items.
- Added an AlertBlock to RestoreVolumeBackups to inform users about potential volume name conflicts.
- Updated mount retrieval logic in the mount router to enhance accuracy and efficiency in fetching volume mounts.
---
.../volume-backups/handle-volume-backups.tsx | 7 ++-----
.../volume-backups/restore-volume-backups.tsx | 4 ++++
apps/dokploy/server/api/routers/mount.ts | 17 ++++++++---------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index f0f00bd26..cd7ca16b3 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -550,11 +550,8 @@ export const HandleVolumeBackups = ({
{mounts?.map((mount) => (
-
- {mount.volumeName}
+
+ {mount.Name}
))}
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
index 295833a39..7c45d0ceb 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/restore-volume-backups.tsx
@@ -44,6 +44,7 @@ import { toast } from "sonner";
import { z } from "zod";
import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { formatBytes } from "../../database/backups/restore-backup";
+import { AlertBlock } from "@/components/shared/alert-block";
interface Props {
id: string;
@@ -169,6 +170,9 @@ export const RestoreVolumeBackups = ({ id, type, serverId }: Props) => {
Select a destination and search for volume backup files
+
+ Make sure the volume name is not being used by another container.
+
diff --git a/apps/dokploy/server/api/routers/mount.ts b/apps/dokploy/server/api/routers/mount.ts
index 63e16c9cb..7add3ab16 100644
--- a/apps/dokploy/server/api/routers/mount.ts
+++ b/apps/dokploy/server/api/routers/mount.ts
@@ -3,18 +3,17 @@ import {
apiFindOneMount,
apiRemoveMount,
apiUpdateMount,
- mounts,
} from "@/server/db/schema";
import {
createMount,
deleteMount,
+ findApplicationById,
findMountById,
+ getServiceContainer,
updateMount,
} from "@dokploy/server";
import { createTRPCRouter, protectedProcedure } from "../trpc";
import { z } from "zod";
-import { and, eq } from "drizzle-orm";
-import { db } from "@dokploy/server/db";
export const mountRouter = createTRPCRouter({
create: protectedProcedure
@@ -40,11 +39,11 @@ export const mountRouter = createTRPCRouter({
allNamedByApplicationId: protectedProcedure
.input(z.object({ applicationId: z.string().min(1) }))
.query(async ({ input }) => {
- return await db.query.mounts.findMany({
- where: and(
- eq(mounts.applicationId, input.applicationId),
- eq(mounts.type, "volume"),
- ),
- });
+ const app = await findApplicationById(input.applicationId);
+ const container = await getServiceContainer(app.appName, app.serverId);
+ const mounts = container?.Mounts.filter(
+ (mount) => mount.Type === "volume" && mount.Source !== "",
+ );
+ return mounts;
}),
});
From 7726c8db21c1091792059555604eb574bddbd667 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 2 Jul 2025 00:09:07 -0600
Subject: [PATCH 32/56] fix: refine volume backup logic and enhance user
feedback
- Updated HandleVolumeBackups to conditionally enable mount retrieval based on volumeBackupType, improving accuracy in fetching mounts.
- Enhanced backupVolume function to provide user feedback upon starting the compose container, ensuring better clarity during operations.
---
.../application/volume-backups/handle-volume-backups.tsx | 2 +-
packages/server/src/utils/volume-backups/utils.ts | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index cd7ca16b3..aee797e45 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -134,7 +134,7 @@ export const HandleVolumeBackups = ({
const { data: mounts } = api.mounts.allNamedByApplicationId.useQuery(
{ applicationId: id || "" },
- { enabled: !!id },
+ { enabled: !!id && volumeBackupType === "application" },
);
const {
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index da49fa5fd..fe138bccf 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -113,7 +113,9 @@ const backupVolume = async (
docker stop $ID`;
startCommand = `
echo "Starting compose container"
- docker start $ID`;
+ docker start $ID
+ echo "Compose container started"
+ `;
}
return `
${stopCommand}
From c5311f2a9fb6d0e749673feedcac34d409416c55 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 2 Jul 2025 00:23:27 -0600
Subject: [PATCH 33/56] feat: implement volume backup and restore
functionalities
- Added backupVolume and restoreVolume functions to handle the backup and restoration of volume data.
- Introduced a new index file to streamline exports for volume backup utilities.
- Updated volume backup logic to include scheduling and improved user feedback during operations.
- Refactored existing volume backup utilities for better organization and clarity.
---
.../server/api/routers/volume-backups.ts | 2 +-
packages/server/src/index.ts | 2 +-
.../server/src/services/volume-backups.ts | 12 +-
.../server/src/utils/volume-backups/backup.ts | 90 ++++++++
.../server/src/utils/volume-backups/index.ts | 3 +
.../src/utils/volume-backups/restore.ts | 126 +++++++++++
.../server/src/utils/volume-backups/utils.ts | 211 +-----------------
7 files changed, 233 insertions(+), 213 deletions(-)
create mode 100644 packages/server/src/utils/volume-backups/backup.ts
create mode 100644 packages/server/src/utils/volume-backups/index.ts
create mode 100644 packages/server/src/utils/volume-backups/restore.ts
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index 3fdfe7de3..a6912f618 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -5,6 +5,7 @@ import {
createVolumeBackup,
runVolumeBackup,
findVolumeBackupById,
+ restoreVolume,
} from "@dokploy/server";
import {
createVolumeBackupSchema,
@@ -16,7 +17,6 @@ import { createTRPCRouter, protectedProcedure } from "../trpc";
import { db } from "@dokploy/server/db";
import { eq } from "drizzle-orm";
import { observable } from "@trpc/server/observable";
-import { restoreVolume } from "@dokploy/server/utils/volume-backups/utils";
import {
execAsyncRemote,
execAsyncStream,
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index dc86c8268..73586004d 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -63,7 +63,7 @@ export * from "./utils/notifications/utils";
export * from "./utils/notifications/docker-cleanup";
export * from "./utils/notifications/server-threshold";
-export * from "./utils/volume-backups/utils";
+export * from "./utils/volume-backups/index";
export * from "./utils/builders/index";
export * from "./utils/builders/compose";
diff --git a/packages/server/src/services/volume-backups.ts b/packages/server/src/services/volume-backups.ts
index 0ae9717ca..887d71258 100644
--- a/packages/server/src/services/volume-backups.ts
+++ b/packages/server/src/services/volume-backups.ts
@@ -7,6 +7,7 @@ import {
import { db } from "../db";
import { TRPCError } from "@trpc/server";
import type { z } from "zod";
+import { scheduleBackup } from "../utils/backups/utils";
export const findVolumeBackupById = async (volumeBackupId: string) => {
const volumeBackup = await db.query.volumeBackups.findFirst({
@@ -39,7 +40,16 @@ export const createVolumeBackup = async (
const newVolumeBackup = await db
.insert(volumeBackups)
.values(volumeBackup)
- .returning();
+ .returning()
+ .then((e) => e[0]);
+
+ await schedule({
+ cronSchedule: backup.schedule,
+ backupId: backup.backupId,
+ type: "backup",
+ });
+
+ scheduleBackup(backup);
return newVolumeBackup;
};
diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts
new file mode 100644
index 000000000..401a47f06
--- /dev/null
+++ b/packages/server/src/utils/volume-backups/backup.ts
@@ -0,0 +1,90 @@
+import { type findVolumeBackupById, paths } from "@dokploy/server";
+import { normalizeS3Path } from "../backups/utils";
+import { getS3Credentials } from "../backups/utils";
+import path from "node:path";
+import { findComposeById } from "@dokploy/server";
+
+export const backupVolume = async (
+ volumeBackup: Awaited>,
+) => {
+ const { serviceType, volumeName, turnOff, prefix } = volumeBackup;
+ const serverId =
+ volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
+ const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
+ const destination = volumeBackup.destination;
+ const backupFileName = `${volumeName}-${new Date().toISOString()}.tar`;
+ const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`;
+ const rcloneFlags = getS3Credentials(volumeBackup.destination);
+ const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`;
+ const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeBackup.appName);
+
+ const rcloneCommand = `rclone copyto ${rcloneFlags.join(" ")} "${volumeBackupPath}/${backupFileName}" "${rcloneDestination}"`;
+
+ const baseCommand = `
+ set -e
+ echo "Volume name: ${volumeName}"
+ echo "Backup file name: ${backupFileName}"
+ echo "Turning off volume backup: ${turnOff ? "Yes" : "No"}"
+ echo "Starting volume backup"
+ echo "Dir: ${volumeBackupPath}"
+ docker run --rm \
+ -v ${volumeName}:/volume_data \
+ -v ${volumeBackupPath}:/backup \
+ ubuntu \
+ bash -c "cd /volume_data && tar cvf /backup/${backupFileName} ."
+ echo "Volume backup done ✅"
+ echo "Starting upload to S3..."
+ ${rcloneCommand}
+ echo "Upload to S3 done ✅"
+ `;
+
+ if (!turnOff) {
+ return baseCommand;
+ }
+
+ if (serviceType === "application") {
+ return `
+ echo "Stopping application to 0 replicas"
+ ACTUAL_REPLICAS=$(docker service inspect ${volumeBackup.application?.appName} --format "{{.Spec.Mode.Replicated.Replicas}}")
+ echo "Actual replicas: $ACTUAL_REPLICAS"
+ docker service scale ${volumeBackup.application?.appName}=0
+ ${baseCommand}
+ echo "Starting application to $ACTUAL_REPLICAS replicas"
+ docker service scale ${volumeBackup.application?.appName}=$ACTUAL_REPLICAS
+ `;
+ }
+ if (serviceType === "compose") {
+ const compose = await findComposeById(
+ volumeBackup.compose?.composeId || "",
+ );
+ let stopCommand = "";
+ let startCommand = "";
+
+ if (compose.composeType === "stack") {
+ stopCommand = `
+ echo "Stopping compose to 0 replicas"
+ echo "Service name: ${compose.appName}_${volumeBackup.serviceName}"
+ ACTUAL_REPLICAS=$(docker service inspect ${compose.appName}_${volumeBackup.serviceName} --format "{{.Spec.Mode.Replicated.Replicas}}")
+ echo "Actual replicas: $ACTUAL_REPLICAS"
+ docker service scale ${compose.appName}_${volumeBackup.serviceName}=0`;
+ startCommand = `
+ echo "Starting compose to $ACTUAL_REPLICAS replicas"
+ docker service scale ${compose.appName}_${volumeBackup.serviceName}=$ACTUAL_REPLICAS`;
+ } else {
+ stopCommand = `
+ echo "Stopping compose container"
+ ID=$(docker ps -q --filter "label=com.docker.compose.project=${compose.appName}" --filter "label=com.docker.compose.service=${volumeBackup.serviceName}")
+ docker stop $ID`;
+ startCommand = `
+ echo "Starting compose container"
+ docker start $ID
+ echo "Compose container started"
+ `;
+ }
+ return `
+ ${stopCommand}
+ ${baseCommand}
+ ${startCommand}
+ `;
+ }
+};
diff --git a/packages/server/src/utils/volume-backups/index.ts b/packages/server/src/utils/volume-backups/index.ts
new file mode 100644
index 000000000..d35162f5e
--- /dev/null
+++ b/packages/server/src/utils/volume-backups/index.ts
@@ -0,0 +1,3 @@
+export * from "./backup";
+export * from "./restore";
+export * from "./utils";
diff --git a/packages/server/src/utils/volume-backups/restore.ts b/packages/server/src/utils/volume-backups/restore.ts
new file mode 100644
index 000000000..b30e585ea
--- /dev/null
+++ b/packages/server/src/utils/volume-backups/restore.ts
@@ -0,0 +1,126 @@
+import {
+ findApplicationById,
+ findComposeById,
+ findDestinationById,
+ getS3Credentials,
+ paths,
+} from "../..";
+import path from "node:path";
+
+export const restoreVolume = async (
+ id: string,
+ destinationId: string,
+ volumeName: string,
+ backupFileName: string,
+ serverId: string,
+ serviceType: "application" | "compose",
+) => {
+ const destination = await findDestinationById(destinationId);
+ const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
+ const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeName);
+ const rcloneFlags = getS3Credentials(destination);
+ const bucketPath = `:s3:${destination.bucket}`;
+ const backupPath = `${bucketPath}/${backupFileName}`;
+
+ // Command to download backup file from S3
+ const downloadCommand = `rclone copyto ${rcloneFlags.join(" ")} "${backupPath}" "${volumeBackupPath}/${backupFileName}"`;
+
+ // Base restore command that creates the volume and restores data
+ const baseRestoreCommand = `
+ set -e
+ echo "Volume name: ${volumeName}"
+ echo "Backup file name: ${backupFileName}"
+ echo "Volume backup path: ${volumeBackupPath}"
+ echo "Downloading backup from S3..."
+ mkdir -p ${volumeBackupPath}
+ ${downloadCommand}
+ echo "Download completed ✅"
+ echo "Creating new volume and restoring data..."
+ docker run --rm \
+ -v ${volumeName}:/volume_data \
+ -v ${volumeBackupPath}:/backup \
+ ubuntu \
+ bash -c "cd /volume_data && tar xvf /backup/${backupFileName} ."
+ echo "Volume restore completed ✅"
+ `;
+
+ // Function to check if volume exists and get containers using it
+ const checkVolumeCommand = `
+ # Check if volume exists
+ VOLUME_EXISTS=$(docker volume ls -q --filter name="^${volumeName}$" | wc -l)
+ echo "Volume exists: $VOLUME_EXISTS"
+
+ if [ "$VOLUME_EXISTS" = "0" ]; then
+ echo "Volume doesn't exist, proceeding with direct restore"
+ ${baseRestoreCommand}
+ else
+ echo "Volume exists, checking for containers using it (including stopped ones)..."
+
+ # Get ALL containers (running and stopped) using this volume - much simpler with native filter!
+ CONTAINERS_USING_VOLUME=$(docker ps -a --filter "volume=${volumeName}" --format "{{.ID}}|{{.Names}}|{{.State}}|{{.Labels}}")
+
+ if [ -z "$CONTAINERS_USING_VOLUME" ]; then
+ echo "Volume exists but no containers are using it"
+ echo "Removing existing volume and proceeding with restore"
+ docker volume rm ${volumeName} --force
+ ${baseRestoreCommand}
+ else
+ echo ""
+ echo "⚠️ WARNING: Cannot restore volume as it is currently in use!"
+ echo ""
+ echo "📋 The following containers are using volume '${volumeName}':"
+ echo ""
+
+ echo "$CONTAINERS_USING_VOLUME" | while IFS='|' read container_id container_name container_state labels; do
+ echo " 🐳 Container: $container_name ($container_id)"
+ echo " Status: $container_state"
+
+ # Determine container type
+ if echo "$labels" | grep -q "com.docker.swarm.service.name="; then
+ SERVICE_NAME=$(echo "$labels" | grep -o "com.docker.swarm.service.name=[^,]*" | cut -d'=' -f2)
+ echo " Type: Docker Swarm Service ($SERVICE_NAME)"
+ elif echo "$labels" | grep -q "com.docker.compose.project="; then
+ PROJECT_NAME=$(echo "$labels" | grep -o "com.docker.compose.project=[^,]*" | cut -d'=' -f2)
+ echo " Type: Docker Compose ($PROJECT_NAME)"
+ else
+ echo " Type: Regular Container"
+ fi
+ echo ""
+ done
+
+ echo ""
+ echo "🔧 To restore this volume, please:"
+ echo " 1. Stop all containers/services using this volume"
+ echo " 2. Remove the existing volume: docker volume rm ${volumeName}"
+ echo " 3. Run the restore operation again"
+ echo ""
+ echo "❌ Volume restore aborted - volume is in use"
+
+ exit 1
+ fi
+ fi
+ `;
+
+ if (serviceType === "application") {
+ const application = await findApplicationById(id);
+ return `
+ echo "=== VOLUME RESTORE FOR APPLICATION ==="
+ echo "Application: ${application.appName}"
+ ${checkVolumeCommand}
+ `;
+ }
+
+ if (serviceType === "compose") {
+ const compose = await findComposeById(id);
+
+ return `
+ echo "=== VOLUME RESTORE FOR COMPOSE ==="
+ echo "Compose: ${compose.appName}"
+ echo "Compose Type: ${compose.composeType}"
+ ${checkVolumeCommand}
+ `;
+ }
+
+ // Fallback for unknown service types
+ return checkVolumeCommand;
+};
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index fe138bccf..4185dd83f 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -3,15 +3,9 @@ import {
createDeploymentVolumeBackup,
execAsync,
execAsyncRemote,
- findApplicationById,
- findComposeById,
- findDestinationById,
- getS3Credentials,
- normalizeS3Path,
- paths,
updateDeploymentStatus,
} from "../..";
-import path from "node:path";
+import { backupVolume } from "./backup";
export const runVolumeBackup = async (volumeBackupId: string) => {
const volumeBackup = await findVolumeBackupById(volumeBackupId);
@@ -39,206 +33,3 @@ export const runVolumeBackup = async (volumeBackupId: string) => {
console.error(error);
}
};
-
-const backupVolume = async (
- volumeBackup: Awaited>,
-) => {
- const { serviceType, volumeName, turnOff, prefix } = volumeBackup;
- const serverId =
- volumeBackup.application?.serverId || volumeBackup.compose?.serverId;
- const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
- const destination = volumeBackup.destination;
- const backupFileName = `${volumeName}-${new Date().toISOString()}.tar`;
- const bucketDestination = `${normalizeS3Path(prefix)}${backupFileName}`;
- const rcloneFlags = getS3Credentials(volumeBackup.destination);
- const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`;
- const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeBackup.appName);
-
- const rcloneCommand = `rclone copyto ${rcloneFlags.join(" ")} "${volumeBackupPath}/${backupFileName}" "${rcloneDestination}"`;
-
- const baseCommand = `
- set -e
- echo "Volume name: ${volumeName}"
- echo "Backup file name: ${backupFileName}"
- echo "Turning off volume backup: ${turnOff ? "Yes" : "No"}"
- echo "Starting volume backup"
- echo "Dir: ${volumeBackupPath}"
- docker run --rm \
- -v ${volumeName}:/volume_data \
- -v ${volumeBackupPath}:/backup \
- ubuntu \
- bash -c "cd /volume_data && tar cvf /backup/${backupFileName} ."
- echo "Volume backup done ✅"
- echo "Starting upload to S3..."
- ${rcloneCommand}
- echo "Upload to S3 done ✅"
- `;
-
- if (!turnOff) {
- return baseCommand;
- }
-
- if (serviceType === "application") {
- return `
- echo "Stopping application to 0 replicas"
- ACTUAL_REPLICAS=$(docker service inspect ${volumeBackup.application?.appName} --format "{{.Spec.Mode.Replicated.Replicas}}")
- echo "Actual replicas: $ACTUAL_REPLICAS"
- docker service scale ${volumeBackup.application?.appName}=0
- ${baseCommand}
- echo "Starting application to $ACTUAL_REPLICAS replicas"
- docker service scale ${volumeBackup.application?.appName}=$ACTUAL_REPLICAS
- `;
- }
- if (serviceType === "compose") {
- const compose = await findComposeById(
- volumeBackup.compose?.composeId || "",
- );
- let stopCommand = "";
- let startCommand = "";
-
- if (compose.composeType === "stack") {
- stopCommand = `
- echo "Stopping compose to 0 replicas"
- echo "Service name: ${compose.appName}_${volumeBackup.serviceName}"
- ACTUAL_REPLICAS=$(docker service inspect ${compose.appName}_${volumeBackup.serviceName} --format "{{.Spec.Mode.Replicated.Replicas}}")
- echo "Actual replicas: $ACTUAL_REPLICAS"
- docker service scale ${compose.appName}_${volumeBackup.serviceName}=0`;
- startCommand = `
- echo "Starting compose to $ACTUAL_REPLICAS replicas"
- docker service scale ${compose.appName}_${volumeBackup.serviceName}=$ACTUAL_REPLICAS`;
- } else {
- stopCommand = `
- echo "Stopping compose container"
- ID=$(docker ps -q --filter "label=com.docker.compose.project=${compose.appName}" --filter "label=com.docker.compose.service=${volumeBackup.serviceName}")
- docker stop $ID`;
- startCommand = `
- echo "Starting compose container"
- docker start $ID
- echo "Compose container started"
- `;
- }
- return `
- ${stopCommand}
- ${baseCommand}
- ${startCommand}
- `;
- }
-};
-
-export const restoreVolume = async (
- id: string,
- destinationId: string,
- volumeName: string,
- backupFileName: string,
- serverId: string,
- serviceType: "application" | "compose",
-) => {
- const destination = await findDestinationById(destinationId);
- const { VOLUME_BACKUPS_PATH } = paths(!!serverId);
- const volumeBackupPath = path.join(VOLUME_BACKUPS_PATH, volumeName);
- const rcloneFlags = getS3Credentials(destination);
- const bucketPath = `:s3:${destination.bucket}`;
- const backupPath = `${bucketPath}/${backupFileName}`;
-
- // Command to download backup file from S3
- const downloadCommand = `rclone copyto ${rcloneFlags.join(" ")} "${backupPath}" "${volumeBackupPath}/${backupFileName}"`;
-
- // Base restore command that creates the volume and restores data
- const baseRestoreCommand = `
- set -e
- echo "Volume name: ${volumeName}"
- echo "Backup file name: ${backupFileName}"
- echo "Volume backup path: ${volumeBackupPath}"
- echo "Downloading backup from S3..."
- mkdir -p ${volumeBackupPath}
- ${downloadCommand}
- echo "Download completed ✅"
- echo "Creating new volume and restoring data..."
- docker run --rm \
- -v ${volumeName}:/volume_data \
- -v ${volumeBackupPath}:/backup \
- ubuntu \
- bash -c "cd /volume_data && tar xvf /backup/${backupFileName} ."
- echo "Volume restore completed ✅"
- `;
-
- // Function to check if volume exists and get containers using it
- const checkVolumeCommand = `
- # Check if volume exists
- VOLUME_EXISTS=$(docker volume ls -q --filter name="^${volumeName}$" | wc -l)
- echo "Volume exists: $VOLUME_EXISTS"
-
- if [ "$VOLUME_EXISTS" = "0" ]; then
- echo "Volume doesn't exist, proceeding with direct restore"
- ${baseRestoreCommand}
- else
- echo "Volume exists, checking for containers using it (including stopped ones)..."
-
- # Get ALL containers (running and stopped) using this volume - much simpler with native filter!
- CONTAINERS_USING_VOLUME=$(docker ps -a --filter "volume=${volumeName}" --format "{{.ID}}|{{.Names}}|{{.State}}|{{.Labels}}")
-
- if [ -z "$CONTAINERS_USING_VOLUME" ]; then
- echo "Volume exists but no containers are using it"
- echo "Removing existing volume and proceeding with restore"
- docker volume rm ${volumeName} --force
- ${baseRestoreCommand}
- else
- echo ""
- echo "⚠️ WARNING: Cannot restore volume as it is currently in use!"
- echo ""
- echo "📋 The following containers are using volume '${volumeName}':"
- echo ""
-
- echo "$CONTAINERS_USING_VOLUME" | while IFS='|' read container_id container_name container_state labels; do
- echo " 🐳 Container: $container_name ($container_id)"
- echo " Status: $container_state"
-
- # Determine container type
- if echo "$labels" | grep -q "com.docker.swarm.service.name="; then
- SERVICE_NAME=$(echo "$labels" | grep -o "com.docker.swarm.service.name=[^,]*" | cut -d'=' -f2)
- echo " Type: Docker Swarm Service ($SERVICE_NAME)"
- elif echo "$labels" | grep -q "com.docker.compose.project="; then
- PROJECT_NAME=$(echo "$labels" | grep -o "com.docker.compose.project=[^,]*" | cut -d'=' -f2)
- echo " Type: Docker Compose ($PROJECT_NAME)"
- else
- echo " Type: Regular Container"
- fi
- echo ""
- done
-
- echo ""
- echo "🔧 To restore this volume, please:"
- echo " 1. Stop all containers/services using this volume"
- echo " 2. Remove the existing volume: docker volume rm ${volumeName}"
- echo " 3. Run the restore operation again"
- echo ""
- echo "❌ Volume restore aborted - volume is in use"
-
- exit 1
- fi
- fi
- `;
-
- if (serviceType === "application") {
- const application = await findApplicationById(id);
- return `
- echo "=== VOLUME RESTORE FOR APPLICATION ==="
- echo "Application: ${application.appName}"
- ${checkVolumeCommand}
- `;
- }
-
- if (serviceType === "compose") {
- const compose = await findComposeById(id);
-
- return `
- echo "=== VOLUME RESTORE FOR COMPOSE ==="
- echo "Compose: ${compose.appName}"
- echo "Compose Type: ${compose.composeType}"
- ${checkVolumeCommand}
- `;
- }
-
- // Fallback for unknown service types
- return checkVolumeCommand;
-};
From 6521491e2feed53497515917d9febbcf9f49aedf Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 2 Jul 2025 00:36:46 -0600
Subject: [PATCH 34/56] feat: enhance volume backup scheduling and management
- Added initVolumeBackupsCronJobs function to initialize scheduled volume backups on server startup.
- Updated volumeBackupsRouter to handle scheduling and removal of volume backup jobs based on user input.
- Improved create and update volume backup logic to include scheduling functionality for both cloud and local environments.
- Introduced utility functions for scheduling and removing volume backup jobs, enhancing overall backup management.
---
.../server/api/routers/volume-backups.ts | 58 +++++++++++++++++--
apps/dokploy/server/server.ts | 2 +
apps/dokploy/server/utils/backup.ts | 5 ++
.../server/src/services/volume-backups.ts | 15 ++---
.../server/src/utils/volume-backups/index.ts | 27 +++++++++
.../server/src/utils/volume-backups/utils.ts | 13 +++++
6 files changed, 104 insertions(+), 16 deletions(-)
diff --git a/apps/dokploy/server/api/routers/volume-backups.ts b/apps/dokploy/server/api/routers/volume-backups.ts
index a6912f618..47e7cb6ec 100644
--- a/apps/dokploy/server/api/routers/volume-backups.ts
+++ b/apps/dokploy/server/api/routers/volume-backups.ts
@@ -6,6 +6,8 @@ import {
runVolumeBackup,
findVolumeBackupById,
restoreVolume,
+ scheduleVolumeBackup,
+ removeVolumeBackupJob,
} from "@dokploy/server";
import {
createVolumeBackupSchema,
@@ -21,6 +23,8 @@ import {
execAsyncRemote,
execAsyncStream,
} from "@dokploy/server/utils/process/execAsync";
+import { removeJob, schedule, updateJob } from "@/server/utils/backup";
+import { TRPCError } from "@trpc/server";
export const volumeBackupsRouter = createTRPCRouter({
list: protectedProcedure
@@ -55,7 +59,20 @@ export const volumeBackupsRouter = createTRPCRouter({
create: protectedProcedure
.input(createVolumeBackupSchema)
.mutation(async ({ input }) => {
- return await createVolumeBackup(input);
+ const newVolumeBackup = await createVolumeBackup(input);
+
+ if (newVolumeBackup?.enabled) {
+ if (IS_CLOUD) {
+ await schedule({
+ cronSchedule: newVolumeBackup.cronExpression,
+ volumeBackupId: newVolumeBackup.volumeBackupId,
+ type: "volume-backup",
+ });
+ } else {
+ await scheduleVolumeBackup(newVolumeBackup.volumeBackupId);
+ }
+ }
+ return newVolumeBackup;
}),
one: protectedProcedure
.input(
@@ -73,15 +90,46 @@ export const volumeBackupsRouter = createTRPCRouter({
}),
)
.mutation(async ({ input }) => {
- if (IS_CLOUD) {
- return true;
- }
return await removeVolumeBackup(input.volumeBackupId);
}),
update: protectedProcedure
.input(updateVolumeBackupSchema)
.mutation(async ({ input }) => {
- return await updateVolumeBackup(input.volumeBackupId, input);
+ const updatedVolumeBackup = await updateVolumeBackup(
+ input.volumeBackupId,
+ input,
+ );
+
+ if (!updatedVolumeBackup) {
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: "Volume backup not found",
+ });
+ }
+
+ if (IS_CLOUD) {
+ if (updatedVolumeBackup.enabled) {
+ await updateJob({
+ cronSchedule: updatedVolumeBackup.cronExpression,
+ volumeBackupId: updatedVolumeBackup.volumeBackupId,
+ type: "volume-backup",
+ });
+ } else {
+ await removeJob({
+ cronSchedule: updatedVolumeBackup.cronExpression,
+ volumeBackupId: updatedVolumeBackup.volumeBackupId,
+ type: "volume-backup",
+ });
+ }
+ } else {
+ if (updatedVolumeBackup?.enabled) {
+ removeVolumeBackupJob(updatedVolumeBackup.volumeBackupId);
+ scheduleVolumeBackup(updatedVolumeBackup.volumeBackupId);
+ } else {
+ removeVolumeBackupJob(updatedVolumeBackup.volumeBackupId);
+ }
+ }
+ return updatedVolumeBackup;
}),
runManually: protectedProcedure
diff --git a/apps/dokploy/server/server.ts b/apps/dokploy/server/server.ts
index 148edda0d..500a701ae 100644
--- a/apps/dokploy/server/server.ts
+++ b/apps/dokploy/server/server.ts
@@ -7,6 +7,7 @@ import {
createDefaultTraefikConfig,
initCronJobs,
initSchedules,
+ initVolumeBackupsCronJobs,
initializeNetwork,
sendDokployRestartNotifications,
setupDirectories,
@@ -51,6 +52,7 @@ void app.prepare().then(async () => {
await migration();
await initCronJobs();
await initSchedules();
+ await initVolumeBackupsCronJobs();
await sendDokployRestartNotifications();
}
diff --git a/apps/dokploy/server/utils/backup.ts b/apps/dokploy/server/utils/backup.ts
index cf0b6c224..9263ecba8 100644
--- a/apps/dokploy/server/utils/backup.ts
+++ b/apps/dokploy/server/utils/backup.ts
@@ -19,6 +19,11 @@ type QueueJob =
type: "schedule";
cronSchedule: string;
scheduleId: string;
+ }
+ | {
+ type: "volume-backup";
+ cronSchedule: string;
+ volumeBackupId: string;
};
export const schedule = async (job: QueueJob) => {
try {
diff --git a/packages/server/src/services/volume-backups.ts b/packages/server/src/services/volume-backups.ts
index 887d71258..1b50e1465 100644
--- a/packages/server/src/services/volume-backups.ts
+++ b/packages/server/src/services/volume-backups.ts
@@ -7,7 +7,6 @@ import {
import { db } from "../db";
import { TRPCError } from "@trpc/server";
import type { z } from "zod";
-import { scheduleBackup } from "../utils/backups/utils";
export const findVolumeBackupById = async (volumeBackupId: string) => {
const volumeBackup = await db.query.volumeBackups.findFirst({
@@ -43,14 +42,6 @@ export const createVolumeBackup = async (
.returning()
.then((e) => e[0]);
- await schedule({
- cronSchedule: backup.schedule,
- backupId: backup.backupId,
- type: "backup",
- });
-
- scheduleBackup(backup);
-
return newVolumeBackup;
};
@@ -64,8 +55,10 @@ export const updateVolumeBackup = async (
volumeBackupId: string,
volumeBackup: z.infer,
) => {
- await db
+ return await db
.update(volumeBackups)
.set(volumeBackup)
- .where(eq(volumeBackups.volumeBackupId, volumeBackupId));
+ .where(eq(volumeBackups.volumeBackupId, volumeBackupId))
+ .returning()
+ .then((e) => e[0]);
};
diff --git a/packages/server/src/utils/volume-backups/index.ts b/packages/server/src/utils/volume-backups/index.ts
index d35162f5e..eb80b09a7 100644
--- a/packages/server/src/utils/volume-backups/index.ts
+++ b/packages/server/src/utils/volume-backups/index.ts
@@ -1,3 +1,30 @@
export * from "./backup";
export * from "./restore";
export * from "./utils";
+import { volumeBackups } from "@dokploy/server/db/schema";
+import { eq } from "drizzle-orm";
+import { db } from "../../db/index";
+import { scheduleVolumeBackup } from "./utils";
+
+export const initVolumeBackupsCronJobs = async () => {
+ console.log("Setting up volume backups cron jobs....");
+ try {
+ const volumeBackupsResult = await db.query.volumeBackups.findMany({
+ where: eq(volumeBackups.enabled, true),
+ with: {
+ application: true,
+ compose: true,
+ },
+ });
+
+ console.log(`Initializing ${volumeBackupsResult.length} volume backups`);
+ for (const volumeBackup of volumeBackupsResult) {
+ scheduleVolumeBackup(volumeBackup.volumeBackupId);
+ console.log(
+ `Initialized volume backup: ${volumeBackup.name} ${volumeBackup.serviceType} ✅`,
+ );
+ }
+ } catch (error) {
+ console.log(`Error initializing volume backups: ${error}`);
+ }
+};
diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts
index 4185dd83f..69affad34 100644
--- a/packages/server/src/utils/volume-backups/utils.ts
+++ b/packages/server/src/utils/volume-backups/utils.ts
@@ -6,6 +6,19 @@ import {
updateDeploymentStatus,
} from "../..";
import { backupVolume } from "./backup";
+import { scheduleJob, scheduledJobs } from "node-schedule";
+
+export const scheduleVolumeBackup = async (volumeBackupId: string) => {
+ const volumeBackup = await findVolumeBackupById(volumeBackupId);
+ scheduleJob(volumeBackupId, volumeBackup.cronExpression, async () => {
+ await runVolumeBackup(volumeBackupId);
+ });
+};
+
+export const removeVolumeBackupJob = async (volumeBackupId: string) => {
+ const currentJob = scheduledJobs[volumeBackupId];
+ currentJob?.cancel();
+};
export const runVolumeBackup = async (volumeBackupId: string) => {
const volumeBackup = await findVolumeBackupById(volumeBackupId);
From 107cdcee49e9d9907025c0c8f82f62ef585d61d9 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 2 Jul 2025 00:45:57 -0600
Subject: [PATCH 35/56] feat: extend volume backup functionality with
scheduling and management
- Added support for volume backup jobs in the scheduling and removal processes.
- Enhanced job management to include volume backups in the job queue.
- Updated schema to accommodate volume backup data structure.
- Implemented initialization of volume backup jobs based on server status, improving backup management.
---
apps/schedules/src/index.ts | 6 ++++
apps/schedules/src/queue.ts | 19 ++++++++++++-
apps/schedules/src/schema.ts | 5 ++++
apps/schedules/src/utils.ts | 55 +++++++++++++++++++++++++++++++++++-
packages/server/src/index.ts | 3 +-
5 files changed, 84 insertions(+), 4 deletions(-)
diff --git a/apps/schedules/src/index.ts b/apps/schedules/src/index.ts
index 7ab2b98c5..af8ad8ff9 100644
--- a/apps/schedules/src/index.ts
+++ b/apps/schedules/src/index.ts
@@ -61,6 +61,12 @@ app.post("/update-backup", zValidator("json", jobQueueSchema), async (c) => {
type: "schedule",
cronSchedule: job.pattern,
});
+ } else if (data.type === "volume-backup") {
+ result = await removeJob({
+ volumeBackupId: data.volumeBackupId,
+ type: "volume-backup",
+ cronSchedule: job.pattern,
+ });
}
logger.info({ result }, "Job removed");
}
diff --git a/apps/schedules/src/queue.ts b/apps/schedules/src/queue.ts
index 5a1efc058..ebc9fa32a 100644
--- a/apps/schedules/src/queue.ts
+++ b/apps/schedules/src/queue.ts
@@ -42,6 +42,12 @@ export const scheduleJob = (job: QueueJob) => {
pattern: job.cronSchedule,
},
});
+ } else if (job.type === "volume-backup") {
+ jobQueue.add(job.volumeBackupId, job, {
+ repeat: {
+ pattern: job.cronSchedule,
+ },
+ });
}
};
@@ -67,6 +73,13 @@ export const removeJob = async (data: QueueJob) => {
});
return result;
}
+ if (data.type === "volume-backup") {
+ const { volumeBackupId, cronSchedule } = data;
+ const result = await jobQueue.removeRepeatable(volumeBackupId, {
+ pattern: cronSchedule,
+ });
+ return result;
+ }
return false;
};
@@ -89,6 +102,10 @@ export const getJobRepeatable = async (
const job = repeatableJobs.find((j) => j.name === scheduleId);
return job ? job : null;
}
-
+ if (data.type === "volume-backup") {
+ const { volumeBackupId } = data;
+ const job = repeatableJobs.find((j) => j.name === volumeBackupId);
+ return job ? job : null;
+ }
return null;
};
diff --git a/apps/schedules/src/schema.ts b/apps/schedules/src/schema.ts
index 32b2536bc..ac01e50de 100644
--- a/apps/schedules/src/schema.ts
+++ b/apps/schedules/src/schema.ts
@@ -16,6 +16,11 @@ export const jobQueueSchema = z.discriminatedUnion("type", [
type: z.literal("schedule"),
scheduleId: z.string(),
}),
+ z.object({
+ cronSchedule: z.string(),
+ type: z.literal("volume-backup"),
+ volumeBackupId: z.string(),
+ }),
]);
export type QueueJob = z.infer;
diff --git a/apps/schedules/src/utils.ts b/apps/schedules/src/utils.ts
index e65775aee..4d255a2b7 100644
--- a/apps/schedules/src/utils.ts
+++ b/apps/schedules/src/utils.ts
@@ -5,6 +5,7 @@ import {
findBackupById,
findScheduleById,
findServerById,
+ findVolumeBackupById,
keepLatestNBackups,
runCommand,
runComposeBackup,
@@ -12,9 +13,15 @@ import {
runMongoBackup,
runMySqlBackup,
runPostgresBackup,
+ runVolumeBackup,
} from "@dokploy/server";
import { db } from "@dokploy/server/dist/db";
-import { backups, schedules, server } from "@dokploy/server/dist/db/schema";
+import {
+ backups,
+ schedules,
+ server,
+ volumeBackups,
+} from "@dokploy/server/dist/db/schema";
import { and, eq } from "drizzle-orm";
import { logger } from "./logger.js";
import { scheduleJob } from "./queue.js";
@@ -93,6 +100,12 @@ export const runJobs = async (job: QueueJob) => {
if (schedule.enabled) {
await runCommand(schedule.scheduleId);
}
+ } else if (job.type === "volume-backup") {
+ const { volumeBackupId } = job;
+ const volumeBackup = await findVolumeBackupById(volumeBackupId);
+ if (volumeBackup.enabled) {
+ await runVolumeBackup(volumeBackupId);
+ }
}
} catch (error) {
logger.error(error);
@@ -184,4 +197,44 @@ export const initializeJobs = async () => {
{ Quantity: filteredSchedulesBasedOnServerStatus.length },
"Schedules Initialized",
);
+
+ const volumeBackupsResult = await db.query.volumeBackups.findMany({
+ where: eq(volumeBackups.enabled, true),
+ with: {
+ application: {
+ with: {
+ server: true,
+ },
+ },
+ compose: {
+ with: {
+ server: true,
+ },
+ },
+ },
+ });
+
+ const filteredVolumeBackupsBasedOnServerStatus = volumeBackupsResult.filter(
+ (volumeBackup) => {
+ if (volumeBackup.application) {
+ return volumeBackup.application.server?.serverStatus === "active";
+ }
+ if (volumeBackup.compose) {
+ return volumeBackup.compose.server?.serverStatus === "active";
+ }
+ },
+ );
+
+ for (const volumeBackup of filteredVolumeBackupsBasedOnServerStatus) {
+ scheduleJob({
+ volumeBackupId: volumeBackup.volumeBackupId,
+ type: "volume-backup",
+ cronSchedule: volumeBackup.cronExpression,
+ });
+ }
+
+ logger.info(
+ { Quantity: filteredVolumeBackupsBasedOnServerStatus.length },
+ "Volume Backups Initialized",
+ );
};
diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts
index 73586004d..1c0655f8b 100644
--- a/packages/server/src/index.ts
+++ b/packages/server/src/index.ts
@@ -63,8 +63,6 @@ export * from "./utils/notifications/utils";
export * from "./utils/notifications/docker-cleanup";
export * from "./utils/notifications/server-threshold";
-export * from "./utils/volume-backups/index";
-
export * from "./utils/builders/index";
export * from "./utils/builders/compose";
export * from "./utils/builders/docker-file";
@@ -135,5 +133,6 @@ export {
export * from "./utils/schedules/utils";
export * from "./utils/schedules/index";
+export * from "./utils/volume-backups/index";
export * from "./lib/logger";
From 3970cd452b1fb174583e63fcea7a954c88c7f673 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Wed, 2 Jul 2025 00:52:25 -0600
Subject: [PATCH 36/56] refactor: update volume backup imports for improved
organization
- Changed import paths for findVolumeBackupById and findComposeById to enhance clarity and maintainability.
- Updated import structure to align with the latest service organization in the @dokploy/server package.
---
packages/server/src/utils/volume-backups/backup.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/server/src/utils/volume-backups/backup.ts b/packages/server/src/utils/volume-backups/backup.ts
index 401a47f06..46a15657f 100644
--- a/packages/server/src/utils/volume-backups/backup.ts
+++ b/packages/server/src/utils/volume-backups/backup.ts
@@ -1,8 +1,9 @@
-import { type findVolumeBackupById, paths } from "@dokploy/server";
+import type { findVolumeBackupById } from "@dokploy/server/services/volume-backups";
import { normalizeS3Path } from "../backups/utils";
import { getS3Credentials } from "../backups/utils";
import path from "node:path";
-import { findComposeById } from "@dokploy/server";
+import { paths } from "@dokploy/server/constants";
+import { findComposeById } from "@dokploy/server/services/compose";
export const backupVolume = async (
volumeBackup: Awaited>,
From 8e8712e33d265293971585464a924ceee9f797b5 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Fri, 4 Jul 2025 23:17:19 -0600
Subject: [PATCH 37/56] style: align text in file tree component for improved
readability
---
apps/dokploy/components/ui/file-tree.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/dokploy/components/ui/file-tree.tsx b/apps/dokploy/components/ui/file-tree.tsx
index 0f50d5089..60c764a92 100644
--- a/apps/dokploy/components/ui/file-tree.tsx
+++ b/apps/dokploy/components/ui/file-tree.tsx
@@ -246,7 +246,9 @@ const Leaf = React.forwardRef<
aria-hidden="true"
/>
)}
- {item.name}
+
+ {item.name}
+
);
});
From 2918868166d20e247d9366c35afa73c34be4e550 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 00:05:36 -0600
Subject: [PATCH 38/56] refactor: remove deprecated volume backup SQL files and
snapshots
- Deleted SQL files related to the volume_backup table, including type definitions, constraints, and columns that are no longer in use.
- Removed associated snapshot files to maintain consistency and reduce clutter in the database schema.
- This cleanup enhances the overall organization and maintainability of the database structure.
---
apps/dokploy/drizzle/0099_eminent_phalanx.sql | 30 -
.../dokploy/drizzle/0100_living_proudstar.sql | 1 -
apps/dokploy/drizzle/0101_kind_black_tom.sql | 1 -
apps/dokploy/drizzle/0102_lush_ink.sql | 1 -
apps/dokploy/drizzle/0103_mean_jimmy_woo.sql | 2 -
.../dokploy/drizzle/0104_robust_nighthawk.sql | 4 -
.../dokploy/drizzle/0105_unknown_firelord.sql | 1 -
apps/dokploy/drizzle/0106_furry_gargoyle.sql | 2 -
.../dokploy/drizzle/0107_brief_the_fallen.sql | 1 -
apps/dokploy/drizzle/meta/0099_snapshot.json | 6070 ----------------
apps/dokploy/drizzle/meta/0100_snapshot.json | 6076 ----------------
apps/dokploy/drizzle/meta/0101_snapshot.json | 6076 ----------------
apps/dokploy/drizzle/meta/0102_snapshot.json | 6083 ----------------
apps/dokploy/drizzle/meta/0103_snapshot.json | 6083 ----------------
apps/dokploy/drizzle/meta/0104_snapshot.json | 6061 ----------------
apps/dokploy/drizzle/meta/0105_snapshot.json | 6067 ----------------
apps/dokploy/drizzle/meta/0106_snapshot.json | 6086 ----------------
apps/dokploy/drizzle/meta/0107_snapshot.json | 6092 -----------------
apps/dokploy/drizzle/meta/_journal.json | 63 -
19 files changed, 54800 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0099_eminent_phalanx.sql
delete mode 100644 apps/dokploy/drizzle/0100_living_proudstar.sql
delete mode 100644 apps/dokploy/drizzle/0101_kind_black_tom.sql
delete mode 100644 apps/dokploy/drizzle/0102_lush_ink.sql
delete mode 100644 apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
delete mode 100644 apps/dokploy/drizzle/0104_robust_nighthawk.sql
delete mode 100644 apps/dokploy/drizzle/0105_unknown_firelord.sql
delete mode 100644 apps/dokploy/drizzle/0106_furry_gargoyle.sql
delete mode 100644 apps/dokploy/drizzle/0107_brief_the_fallen.sql
delete mode 100644 apps/dokploy/drizzle/meta/0099_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0100_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0101_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0102_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0103_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0104_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0105_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0106_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0107_snapshot.json
diff --git a/apps/dokploy/drizzle/0099_eminent_phalanx.sql b/apps/dokploy/drizzle/0099_eminent_phalanx.sql
deleted file mode 100644
index b33e56d61..000000000
--- a/apps/dokploy/drizzle/0099_eminent_phalanx.sql
+++ /dev/null
@@ -1,30 +0,0 @@
-CREATE TYPE "public"."volumeBackupType" AS ENUM('bind', 'volume');--> statement-breakpoint
-CREATE TABLE "volume_backup" (
- "volumeBackupId" text PRIMARY KEY NOT NULL,
- "name" text NOT NULL,
- "type" "volumeBackupType" DEFAULT 'volume' NOT NULL,
- "volumeName" text,
- "hostPath" text,
- "prefix" text NOT NULL,
- "serviceType" "serviceType" DEFAULT 'application' NOT NULL,
- "schedule" text NOT NULL,
- "keepLatestCount" integer,
- "applicationId" text,
- "postgresId" text,
- "mariadbId" text,
- "mongoId" text,
- "mysqlId" text,
- "redisId" text,
- "composeId" text,
- "createdAt" text NOT NULL,
- "destinationId" text NOT NULL
-);
---> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0100_living_proudstar.sql b/apps/dokploy/drizzle/0100_living_proudstar.sql
deleted file mode 100644
index 25f737f01..000000000
--- a/apps/dokploy/drizzle/0100_living_proudstar.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "volume_backup" ADD COLUMN "enabled" boolean;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0101_kind_black_tom.sql b/apps/dokploy/drizzle/0101_kind_black_tom.sql
deleted file mode 100644
index 239f7e7d9..000000000
--- a/apps/dokploy/drizzle/0101_kind_black_tom.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "volume_backup" RENAME COLUMN "schedule" TO "cronExpression";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0102_lush_ink.sql b/apps/dokploy/drizzle/0102_lush_ink.sql
deleted file mode 100644
index eb74b6d96..000000000
--- a/apps/dokploy/drizzle/0102_lush_ink.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql b/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
deleted file mode 100644
index 338cd31d9..000000000
--- a/apps/dokploy/drizzle/0103_mean_jimmy_woo.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE "volume_backup" ADD COLUMN "turnOff" boolean DEFAULT false NOT NULL;--> statement-breakpoint
-ALTER TABLE "backup" DROP COLUMN "turnOff";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0104_robust_nighthawk.sql b/apps/dokploy/drizzle/0104_robust_nighthawk.sql
deleted file mode 100644
index 742c17ec4..000000000
--- a/apps/dokploy/drizzle/0104_robust_nighthawk.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE "volume_backup" ALTER COLUMN "volumeName" SET NOT NULL;--> statement-breakpoint
-ALTER TABLE "volume_backup" DROP COLUMN "type";--> statement-breakpoint
-ALTER TABLE "volume_backup" DROP COLUMN "hostPath";--> statement-breakpoint
-DROP TYPE "public"."volumeBackupType";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0105_unknown_firelord.sql b/apps/dokploy/drizzle/0105_unknown_firelord.sql
deleted file mode 100644
index 2ad181e66..000000000
--- a/apps/dokploy/drizzle/0105_unknown_firelord.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "volume_backup" ADD COLUMN "serviceName" text;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0106_furry_gargoyle.sql b/apps/dokploy/drizzle/0106_furry_gargoyle.sql
deleted file mode 100644
index a57c47c58..000000000
--- a/apps/dokploy/drizzle/0106_furry_gargoyle.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE "deployment" ADD COLUMN "volumeBackupId" text;--> statement-breakpoint
-ALTER TABLE "deployment" ADD CONSTRAINT "deployment_volumeBackupId_volume_backup_volumeBackupId_fk" FOREIGN KEY ("volumeBackupId") REFERENCES "public"."volume_backup"("volumeBackupId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0107_brief_the_fallen.sql b/apps/dokploy/drizzle/0107_brief_the_fallen.sql
deleted file mode 100644
index 2fa325dc9..000000000
--- a/apps/dokploy/drizzle/0107_brief_the_fallen.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "volume_backup" ADD COLUMN "appName" text NOT NULL;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0099_snapshot.json b/apps/dokploy/drizzle/meta/0099_snapshot.json
deleted file mode 100644
index d14875a5d..000000000
--- a/apps/dokploy/drizzle/meta/0099_snapshot.json
+++ /dev/null
@@ -1,6070 +0,0 @@
-{
- "id": "f6199864-45bf-4f82-800d-3d7893dd87a1",
- "prevId": "edde8c54-b715-4db6-bc3a-85d435226083",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "volumeBackupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'volume'"
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- },
- "public.volumeBackupType": {
- "name": "volumeBackupType",
- "schema": "public",
- "values": [
- "bind",
- "volume"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0100_snapshot.json b/apps/dokploy/drizzle/meta/0100_snapshot.json
deleted file mode 100644
index 46432b6a8..000000000
--- a/apps/dokploy/drizzle/meta/0100_snapshot.json
+++ /dev/null
@@ -1,6076 +0,0 @@
-{
- "id": "aa5e3660-136e-4e86-9af5-d15f49adf065",
- "prevId": "f6199864-45bf-4f82-800d-3d7893dd87a1",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "volumeBackupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'volume'"
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "schedule": {
- "name": "schedule",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- },
- "public.volumeBackupType": {
- "name": "volumeBackupType",
- "schema": "public",
- "values": [
- "bind",
- "volume"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0101_snapshot.json b/apps/dokploy/drizzle/meta/0101_snapshot.json
deleted file mode 100644
index e76acf5bb..000000000
--- a/apps/dokploy/drizzle/meta/0101_snapshot.json
+++ /dev/null
@@ -1,6076 +0,0 @@
-{
- "id": "f0506de9-e04d-4e20-a31c-4113d637c137",
- "prevId": "aa5e3660-136e-4e86-9af5-d15f49adf065",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "volumeBackupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'volume'"
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- },
- "public.volumeBackupType": {
- "name": "volumeBackupType",
- "schema": "public",
- "values": [
- "bind",
- "volume"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0102_snapshot.json b/apps/dokploy/drizzle/meta/0102_snapshot.json
deleted file mode 100644
index 41b76f027..000000000
--- a/apps/dokploy/drizzle/meta/0102_snapshot.json
+++ /dev/null
@@ -1,6083 +0,0 @@
-{
- "id": "b0457bcf-32a8-4746-ab0f-59b8d3e1920a",
- "prevId": "f0506de9-e04d-4e20-a31c-4113d637c137",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "volumeBackupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'volume'"
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- },
- "public.volumeBackupType": {
- "name": "volumeBackupType",
- "schema": "public",
- "values": [
- "bind",
- "volume"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0103_snapshot.json b/apps/dokploy/drizzle/meta/0103_snapshot.json
deleted file mode 100644
index fe904bd7d..000000000
--- a/apps/dokploy/drizzle/meta/0103_snapshot.json
+++ /dev/null
@@ -1,6083 +0,0 @@
-{
- "id": "e7e4e8f6-ed22-4f91-8fbe-3b2c14ed4928",
- "prevId": "b0457bcf-32a8-4746-ab0f-59b8d3e1920a",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "type": {
- "name": "type",
- "type": "volumeBackupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'volume'"
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "hostPath": {
- "name": "hostPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- },
- "public.volumeBackupType": {
- "name": "volumeBackupType",
- "schema": "public",
- "values": [
- "bind",
- "volume"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0104_snapshot.json b/apps/dokploy/drizzle/meta/0104_snapshot.json
deleted file mode 100644
index ab6ae59a6..000000000
--- a/apps/dokploy/drizzle/meta/0104_snapshot.json
+++ /dev/null
@@ -1,6061 +0,0 @@
-{
- "id": "325c184e-a32b-4a08-a974-0f23e3bb764f",
- "prevId": "e7e4e8f6-ed22-4f91-8fbe-3b2c14ed4928",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0105_snapshot.json b/apps/dokploy/drizzle/meta/0105_snapshot.json
deleted file mode 100644
index 00e79a9bb..000000000
--- a/apps/dokploy/drizzle/meta/0105_snapshot.json
+++ /dev/null
@@ -1,6067 +0,0 @@
-{
- "id": "b0c70ec0-741e-4f5e-9f57-eb2385c758d7",
- "prevId": "325c184e-a32b-4a08-a974-0f23e3bb764f",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0106_snapshot.json b/apps/dokploy/drizzle/meta/0106_snapshot.json
deleted file mode 100644
index 317d6f7ba..000000000
--- a/apps/dokploy/drizzle/meta/0106_snapshot.json
+++ /dev/null
@@ -1,6086 +0,0 @@
-{
- "id": "b63fe208-f84f-4ab0-befa-e943dc1d1538",
- "prevId": "b0c70ec0-741e-4f5e-9f57-eb2385c758d7",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeBackupId": {
- "name": "volumeBackupId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
- "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
- "tableFrom": "deployment",
- "tableTo": "volume_backup",
- "columnsFrom": [
- "volumeBackupId"
- ],
- "columnsTo": [
- "volumeBackupId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0107_snapshot.json b/apps/dokploy/drizzle/meta/0107_snapshot.json
deleted file mode 100644
index 505c562bb..000000000
--- a/apps/dokploy/drizzle/meta/0107_snapshot.json
+++ /dev/null
@@ -1,6092 +0,0 @@
-{
- "id": "5e267f05-3017-4ca8-9921-bf34bb5ddd6a",
- "prevId": "b63fe208-f84f-4ab0-befa-e943dc1d1538",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeBackupId": {
- "name": "volumeBackupId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
- "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
- "tableFrom": "deployment",
- "tableTo": "volume_backup",
- "columnsFrom": [
- "volumeBackupId"
- ],
- "columnsTo": [
- "volumeBackupId"
- ],
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "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 9e29751eb..855c90e71 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -694,69 +694,6 @@
"when": 1751233265357,
"tag": "0098_conscious_chat",
"breakpoints": true
- },
- {
- "idx": 99,
- "version": "7",
- "when": 1751256324670,
- "tag": "0099_eminent_phalanx",
- "breakpoints": true
- },
- {
- "idx": 100,
- "version": "7",
- "when": 1751256405233,
- "tag": "0100_living_proudstar",
- "breakpoints": true
- },
- {
- "idx": 101,
- "version": "7",
- "when": 1751256432021,
- "tag": "0101_kind_black_tom",
- "breakpoints": true
- },
- {
- "idx": 102,
- "version": "7",
- "when": 1751256715662,
- "tag": "0102_lush_ink",
- "breakpoints": true
- },
- {
- "idx": 103,
- "version": "7",
- "when": 1751256796247,
- "tag": "0103_mean_jimmy_woo",
- "breakpoints": true
- },
- {
- "idx": 104,
- "version": "7",
- "when": 1751259486912,
- "tag": "0104_robust_nighthawk",
- "breakpoints": true
- },
- {
- "idx": 105,
- "version": "7",
- "when": 1751259917258,
- "tag": "0105_unknown_firelord",
- "breakpoints": true
- },
- {
- "idx": 106,
- "version": "7",
- "when": 1751260111986,
- "tag": "0106_furry_gargoyle",
- "breakpoints": true
- },
- {
- "idx": 107,
- "version": "7",
- "when": 1751260608863,
- "tag": "0107_brief_the_fallen",
- "breakpoints": true
}
]
}
\ No newline at end of file
From cf3f44f686618751ab73b63423be6cdd8e24f574 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 00:06:07 -0600
Subject: [PATCH 39/56] feat(database): add volume_backup table and related
foreign key constraints
- Introduced a new table "volume_backup" to manage volume backup configurations.
- Added foreign key constraints linking "volumeBackupId" in the "deployment" table to the new "volume_backup" table.
- Updated the journal and snapshot files to reflect these changes, ensuring proper versioning and tracking.
---
apps/dokploy/drizzle/0100_dizzy_jackal.sql | 33 +
apps/dokploy/drizzle/meta/0100_snapshot.json | 6108 ++++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
3 files changed, 6148 insertions(+)
create mode 100644 apps/dokploy/drizzle/0100_dizzy_jackal.sql
create mode 100644 apps/dokploy/drizzle/meta/0100_snapshot.json
diff --git a/apps/dokploy/drizzle/0100_dizzy_jackal.sql b/apps/dokploy/drizzle/0100_dizzy_jackal.sql
new file mode 100644
index 000000000..91674ee2c
--- /dev/null
+++ b/apps/dokploy/drizzle/0100_dizzy_jackal.sql
@@ -0,0 +1,33 @@
+CREATE TABLE "volume_backup" (
+ "volumeBackupId" text PRIMARY KEY NOT NULL,
+ "name" text NOT NULL,
+ "volumeName" text NOT NULL,
+ "prefix" text NOT NULL,
+ "serviceType" "serviceType" DEFAULT 'application' NOT NULL,
+ "appName" text NOT NULL,
+ "serviceName" text,
+ "turnOff" boolean DEFAULT false NOT NULL,
+ "cronExpression" text NOT NULL,
+ "keepLatestCount" integer,
+ "enabled" boolean,
+ "applicationId" text,
+ "postgresId" text,
+ "mariadbId" text,
+ "mongoId" text,
+ "mysqlId" text,
+ "redisId" text,
+ "composeId" text,
+ "createdAt" text NOT NULL,
+ "destinationId" text NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "deployment" ADD COLUMN "volumeBackupId" text;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "deployment" ADD CONSTRAINT "deployment_volumeBackupId_volume_backup_volumeBackupId_fk" FOREIGN KEY ("volumeBackupId") REFERENCES "public"."volume_backup"("volumeBackupId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0100_snapshot.json b/apps/dokploy/drizzle/meta/0100_snapshot.json
new file mode 100644
index 000000000..6cb360b7e
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0100_snapshot.json
@@ -0,0 +1,6108 @@
+{
+ "id": "95a98cab-0072-4c29-b3f4-7f02fed6922e",
+ "prevId": "71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "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
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 f981a42cc..988a6d1ab 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -701,6 +701,13 @@
"when": 1751693569786,
"tag": "0099_wise_golden_guardian",
"breakpoints": true
+ },
+ {
+ "idx": 100,
+ "version": "7",
+ "when": 1751695554830,
+ "tag": "0100_dizzy_jackal",
+ "breakpoints": true
}
]
}
\ No newline at end of file
From 7874445510a91c105d5d71798c2ced9dcaf7e220 Mon Sep 17 00:00:00 2001
From: DearTanker <1122669+DearTanker@users.noreply.github.com>
Date: Sat, 5 Jul 2025 17:24:11 +0800
Subject: [PATCH 40/56] Style: Change Node Applications dialog width, more easy
to read.
---
.../dashboard/swarm/applications/show-applications.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx b/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
index 681afd755..7e0f25fed 100644
--- a/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
+++ b/apps/dokploy/components/dashboard/swarm/applications/show-applications.tsx
@@ -87,7 +87,7 @@ export const ShowNodeApplications = ({ serverId }: Props) => {
Services
-
+
Node Applications
From d27dff4906f9c0b8373557259dce16bf6222ae60 Mon Sep 17 00:00:00 2001
From: andrei1010
Date: Sat, 5 Jul 2025 17:14:28 +0200
Subject: [PATCH 41/56] fix: fix environment variable parsing for railpack
---
packages/server/src/utils/docker/utils.ts | 56 +++++++++++------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/packages/server/src/utils/docker/utils.ts b/packages/server/src/utils/docker/utils.ts
index a9e2f49ab..b67aa1707 100644
--- a/packages/server/src/utils/docker/utils.ts
+++ b/packages/server/src/utils/docker/utils.ts
@@ -287,7 +287,7 @@ export const parseEnvironmentKeyValuePair = (
throw new Error(`Invalid environment variable pair: ${pair}`);
}
- return [key, valueParts.join("")];
+ return [key, valueParts.join("=")];
};
export const getEnviromentVariablesObject = (
@@ -370,53 +370,53 @@ export const generateConfigContainer = (application: ApplicationNested) => {
}),
...(restartPolicySwarm
? {
- RestartPolicy: restartPolicySwarm,
- }
+ RestartPolicy: restartPolicySwarm,
+ }
: {}),
...(placementSwarm
? {
- Placement: placementSwarm,
- }
+ Placement: placementSwarm,
+ }
: {
- // if app have mounts keep manager as constraint
- Placement: {
- Constraints: haveMounts ? ["node.role==manager"] : [],
- },
- }),
+ // if app have mounts keep manager as constraint
+ Placement: {
+ Constraints: haveMounts ? ["node.role==manager"] : [],
+ },
+ }),
...(labelsSwarm && {
Labels: labelsSwarm,
}),
...(modeSwarm
? {
- Mode: modeSwarm,
- }
+ Mode: modeSwarm,
+ }
: {
- // use replicas value if no modeSwarm provided
- Mode: {
- Replicated: {
- Replicas: replicas,
- },
+ // use replicas value if no modeSwarm provided
+ Mode: {
+ Replicated: {
+ Replicas: replicas,
},
- }),
+ },
+ }),
...(rollbackConfigSwarm && {
RollbackConfig: rollbackConfigSwarm,
}),
...(updateConfigSwarm
? { UpdateConfig: updateConfigSwarm }
: {
- // default config if no updateConfigSwarm provided
- UpdateConfig: {
- Parallelism: 1,
- Order: "start-first",
- },
- }),
+ // default config if no updateConfigSwarm provided
+ UpdateConfig: {
+ Parallelism: 1,
+ Order: "start-first",
+ },
+ }),
...(networkSwarm
? {
- Networks: networkSwarm,
- }
+ Networks: networkSwarm,
+ }
: {
- Networks: [{ Target: "dokploy-network" }],
- }),
+ Networks: [{ Target: "dokploy-network" }],
+ }),
};
};
From ee2bbf5e3711dcf9d8cb654ce269674e77f4846a Mon Sep 17 00:00:00 2001
From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com>
Date: Sat, 5 Jul 2025 17:38:16 +0000
Subject: [PATCH 42/56] [autofix.ci] apply automated fixes
---
packages/server/src/utils/docker/utils.ts | 54 +++++++++++------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/packages/server/src/utils/docker/utils.ts b/packages/server/src/utils/docker/utils.ts
index b67aa1707..22d85c571 100644
--- a/packages/server/src/utils/docker/utils.ts
+++ b/packages/server/src/utils/docker/utils.ts
@@ -370,53 +370,53 @@ export const generateConfigContainer = (application: ApplicationNested) => {
}),
...(restartPolicySwarm
? {
- RestartPolicy: restartPolicySwarm,
- }
+ RestartPolicy: restartPolicySwarm,
+ }
: {}),
...(placementSwarm
? {
- Placement: placementSwarm,
- }
+ Placement: placementSwarm,
+ }
: {
- // if app have mounts keep manager as constraint
- Placement: {
- Constraints: haveMounts ? ["node.role==manager"] : [],
- },
- }),
+ // if app have mounts keep manager as constraint
+ Placement: {
+ Constraints: haveMounts ? ["node.role==manager"] : [],
+ },
+ }),
...(labelsSwarm && {
Labels: labelsSwarm,
}),
...(modeSwarm
? {
- Mode: modeSwarm,
- }
+ Mode: modeSwarm,
+ }
: {
- // use replicas value if no modeSwarm provided
- Mode: {
- Replicated: {
- Replicas: replicas,
+ // use replicas value if no modeSwarm provided
+ Mode: {
+ Replicated: {
+ Replicas: replicas,
+ },
},
- },
- }),
+ }),
...(rollbackConfigSwarm && {
RollbackConfig: rollbackConfigSwarm,
}),
...(updateConfigSwarm
? { UpdateConfig: updateConfigSwarm }
: {
- // default config if no updateConfigSwarm provided
- UpdateConfig: {
- Parallelism: 1,
- Order: "start-first",
- },
- }),
+ // default config if no updateConfigSwarm provided
+ UpdateConfig: {
+ Parallelism: 1,
+ Order: "start-first",
+ },
+ }),
...(networkSwarm
? {
- Networks: networkSwarm,
- }
+ Networks: networkSwarm,
+ }
: {
- Networks: [{ Target: "dokploy-network" }],
- }),
+ Networks: [{ Target: "dokploy-network" }],
+ }),
};
};
From 2f6084ec8f2b5d604b9b053bcb516b48d409a279 Mon Sep 17 00:00:00 2001
From: Jhonatan Caldeira
Date: Sat, 5 Jul 2025 16:08:09 -0300
Subject: [PATCH 43/56] fix(conflicts): removed conflicted migrations
---
...st_the_order.sql => 0100_purple_rogue.sql} | 0
apps/dokploy/drizzle/meta/0100_snapshot.json | 5862 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
3 files changed, 5869 insertions(+)
rename apps/dokploy/drizzle/{0099_fast_the_order.sql => 0100_purple_rogue.sql} (100%)
create mode 100644 apps/dokploy/drizzle/meta/0100_snapshot.json
diff --git a/apps/dokploy/drizzle/0099_fast_the_order.sql b/apps/dokploy/drizzle/0100_purple_rogue.sql
similarity index 100%
rename from apps/dokploy/drizzle/0099_fast_the_order.sql
rename to apps/dokploy/drizzle/0100_purple_rogue.sql
diff --git a/apps/dokploy/drizzle/meta/0100_snapshot.json b/apps/dokploy/drizzle/meta/0100_snapshot.json
new file mode 100644
index 000000000..61520cac8
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0100_snapshot.json
@@ -0,0 +1,5862 @@
+{
+ "id": "abe187f7-21c6-47c4-9492-038e866ded60",
+ "prevId": "71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "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
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 f981a42cc..ecd86c92e 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -701,6 +701,13 @@
"when": 1751693569786,
"tag": "0099_wise_golden_guardian",
"breakpoints": true
+ },
+ {
+ "idx": 100,
+ "version": "7",
+ "when": 1751741736144,
+ "tag": "0100_purple_rogue",
+ "breakpoints": true
}
]
}
\ No newline at end of file
From db9109a3be4c1297580d2a88b12e456920a051b8 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 14:43:49 -0600
Subject: [PATCH 44/56] fix(settings): update readMonitoringConfig to async and
improve log reading efficiency
---
apps/dokploy/server/api/routers/settings.ts | 8 +--
.../server/src/utils/traefik/application.ts | 49 ++++++++++---------
2 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts
index 9bab0622e..9ab142c58 100644
--- a/apps/dokploy/server/api/routers/settings.ts
+++ b/apps/dokploy/server/api/routers/settings.ts
@@ -609,14 +609,14 @@ export const settingsRouter = createTRPCRouter({
},
})
.input(apiReadStatsLogs)
- .query(({ input }) => {
+ .query(async ({ input }) => {
if (IS_CLOUD) {
return {
data: [],
totalCount: 0,
};
}
- const rawConfig = readMonitoringConfig(
+ const rawConfig = await readMonitoringConfig(
!!input.dateRange?.start && !!input.dateRange?.end,
);
@@ -652,11 +652,11 @@ export const settingsRouter = createTRPCRouter({
})
.optional(),
)
- .query(({ input }) => {
+ .query(async ({ input }) => {
if (IS_CLOUD) {
return [];
}
- const rawConfig = readMonitoringConfig(
+ const rawConfig = await readMonitoringConfig(
!!input?.dateRange?.start || !!input?.dateRange?.end,
);
const processedLogs = processLogs(rawConfig as string, input?.dateRange);
diff --git a/packages/server/src/utils/traefik/application.ts b/packages/server/src/utils/traefik/application.ts
index 773f2bf64..8e7ca574b 100644
--- a/packages/server/src/utils/traefik/application.ts
+++ b/packages/server/src/utils/traefik/application.ts
@@ -1,5 +1,7 @@
import fs, { writeFileSync } from "node:fs";
import path from "node:path";
+import { createReadStream } from "node:fs";
+import { createInterface } from "node:readline";
import { paths } from "@dokploy/server/constants";
import type { Domain } from "@dokploy/server/services/domain";
import { dump, load } from "js-yaml";
@@ -137,39 +139,40 @@ export const readRemoteConfig = async (serverId: string, appName: string) => {
}
};
-export const readMonitoringConfig = (readAll = false) => {
+export const readMonitoringConfig = async (readAll = false) => {
const { DYNAMIC_TRAEFIK_PATH } = paths();
const configPath = path.join(DYNAMIC_TRAEFIK_PATH, "access.log");
if (fs.existsSync(configPath)) {
if (!readAll) {
- // Read first 500 lines
+ // Read first 500 lines using streams
let content = "";
- let chunk = "";
let validCount = 0;
- for (const char of fs.readFileSync(configPath, "utf8")) {
- chunk += char;
- if (char === "\n") {
- try {
- const trimmed = chunk.trim();
- if (
- trimmed !== "" &&
- trimmed.startsWith("{") &&
- trimmed.endsWith("}")
- ) {
- const log = JSON.parse(trimmed);
- if (log.ServiceName !== "dokploy-service-app@file") {
- content += chunk;
- validCount++;
- if (validCount >= 500) {
- break;
- }
+ const fileStream = createReadStream(configPath, { encoding: "utf8" });
+ const readline = createInterface({
+ input: fileStream,
+ crlfDelay: Number.POSITIVE_INFINITY,
+ });
+
+ for await (const line of readline) {
+ try {
+ const trimmed = line.trim();
+ if (
+ trimmed !== "" &&
+ trimmed.startsWith("{") &&
+ trimmed.endsWith("}")
+ ) {
+ const log = JSON.parse(trimmed);
+ if (log.ServiceName !== "dokploy-service-app@file") {
+ content += `${line}\n`;
+ validCount++;
+ if (validCount >= 500) {
+ break;
}
}
- } catch {
- // Ignore invalid JSON
}
- chunk = "";
+ } catch {
+ // Ignore invalid JSON
}
}
return content;
From 05e0031dafca0eacaaa435a1160bc2c75203d0c0 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 15:40:14 -0600
Subject: [PATCH 45/56] refactor(database): remove volume_backup table and
associated metadata
- Deleted the "volume_backup" table and its related SQL definitions, including foreign key constraints in the "deployment" table.
- Removed corresponding entries from the journal and snapshot files to ensure consistency and maintain a clean database schema.
- This cleanup improves the organization and maintainability of the database structure.
---
apps/dokploy/drizzle/0100_dizzy_jackal.sql | 33 -
apps/dokploy/drizzle/meta/0100_snapshot.json | 6108 ------------------
apps/dokploy/drizzle/meta/_journal.json | 7 -
3 files changed, 6148 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0100_dizzy_jackal.sql
delete mode 100644 apps/dokploy/drizzle/meta/0100_snapshot.json
diff --git a/apps/dokploy/drizzle/0100_dizzy_jackal.sql b/apps/dokploy/drizzle/0100_dizzy_jackal.sql
deleted file mode 100644
index 91674ee2c..000000000
--- a/apps/dokploy/drizzle/0100_dizzy_jackal.sql
+++ /dev/null
@@ -1,33 +0,0 @@
-CREATE TABLE "volume_backup" (
- "volumeBackupId" text PRIMARY KEY NOT NULL,
- "name" text NOT NULL,
- "volumeName" text NOT NULL,
- "prefix" text NOT NULL,
- "serviceType" "serviceType" DEFAULT 'application' NOT NULL,
- "appName" text NOT NULL,
- "serviceName" text,
- "turnOff" boolean DEFAULT false NOT NULL,
- "cronExpression" text NOT NULL,
- "keepLatestCount" integer,
- "enabled" boolean,
- "applicationId" text,
- "postgresId" text,
- "mariadbId" text,
- "mongoId" text,
- "mysqlId" text,
- "redisId" text,
- "composeId" text,
- "createdAt" text NOT NULL,
- "destinationId" text NOT NULL
-);
---> statement-breakpoint
-ALTER TABLE "deployment" ADD COLUMN "volumeBackupId" text;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "deployment" ADD CONSTRAINT "deployment_volumeBackupId_volume_backup_volumeBackupId_fk" FOREIGN KEY ("volumeBackupId") REFERENCES "public"."volume_backup"("volumeBackupId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0100_snapshot.json b/apps/dokploy/drizzle/meta/0100_snapshot.json
deleted file mode 100644
index 6cb360b7e..000000000
--- a/apps/dokploy/drizzle/meta/0100_snapshot.json
+++ /dev/null
@@ -1,6108 +0,0 @@
-{
- "id": "95a98cab-0072-4c29-b3f4-7f02fed6922e",
- "prevId": "71f68c87-ddb4-4e8c-b9fc-1db7fbcedf56",
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "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'"
- },
- "previewCustomCertResolver": {
- "name": "previewCustomCertResolver",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "previewLimit": {
- "name": "previewLimit",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 3
- },
- "isPreviewDeploymentsActive": {
- "name": "isPreviewDeploymentsActive",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "rollbackActive": {
- "name": "rollbackActive",
- "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'"
- },
- "cleanCache": {
- "name": "cleanCache",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "default": false
- },
- "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": "'/'"
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBuildPath": {
- "name": "giteaBuildPath",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'/'"
- },
- "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
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": 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
- },
- "isStaticSpa": {
- "name": "isStaticSpa",
- "type": "boolean",
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "application_giteaId_gitea_giteaId_fk",
- "tableFrom": "application",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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": "''"
- },
- "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'"
- },
- "https": {
- "name": "https",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "logCleanupCron": {
- "name": "logCleanupCron",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'0 0 * * *'"
- },
- "role": {
- "name": "role",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'user'"
- },
- "enablePaidFeatures": {
- "name": "enablePaidFeatures",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "allowImpersonation": {
- "name": "allowImpersonation",
- "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
- },
- "customCertResolver": {
- "name": "customCertResolver",
- "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
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "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
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "backupType": {
- "name": "backupType",
- "type": "backupType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'database'"
- },
- "databaseType": {
- "name": "databaseType",
- "type": "databaseType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true
- },
- "composeId": {
- "name": "composeId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "jsonb",
- "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_composeId_compose_composeId_fk": {
- "name": "backup_composeId_compose_composeId_fk",
- "tableFrom": "backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "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"
- },
- "backup_userId_user_temp_id_fk": {
- "name": "backup_userId_user_temp_id_fk",
- "tableFrom": "backup",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "no action",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "backup_appName_unique": {
- "name": "backup_appName_unique",
- "nullsNotDistinct": false,
- "columns": [
- "appName"
- ]
- }
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "now()"
- }
- },
- "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
- },
- "pid": {
- "name": "pid",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "startedAt": {
- "name": "startedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "finishedAt": {
- "name": "finishedAt",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "errorMessage": {
- "name": "errorMessage",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "backupId": {
- "name": "backupId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "volumeBackupId": {
- "name": "volumeBackupId",
- "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"
- },
- "deployment_scheduleId_schedule_scheduleId_fk": {
- "name": "deployment_scheduleId_schedule_scheduleId_fk",
- "tableFrom": "deployment",
- "tableTo": "schedule",
- "columnsFrom": [
- "scheduleId"
- ],
- "columnsTo": [
- "scheduleId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_backupId_backup_backupId_fk": {
- "name": "deployment_backupId_backup_backupId_fk",
- "tableFrom": "deployment",
- "tableTo": "backup",
- "columnsFrom": [
- "backupId"
- ],
- "columnsTo": [
- "backupId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_rollbackId_rollback_rollbackId_fk": {
- "name": "deployment_rollbackId_rollback_rollbackId_fk",
- "tableFrom": "deployment",
- "tableTo": "rollback",
- "columnsFrom": [
- "rollbackId"
- ],
- "columnsTo": [
- "rollbackId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
- "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
- "tableFrom": "deployment",
- "tableTo": "volume_backup",
- "columnsFrom": [
- "volumeBackupId"
- ],
- "columnsTo": [
- "volumeBackupId"
- ],
- "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
- },
- "publishMode": {
- "name": "publishMode",
- "type": "publishModeType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'host'"
- },
- "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
- },
- "giteaRepository": {
- "name": "giteaRepository",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaOwner": {
- "name": "giteaOwner",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "giteaBranch": {
- "name": "giteaBranch",
- "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": "''"
- },
- "enableSubmodules": {
- "name": "enableSubmodules",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "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
- },
- "triggerType": {
- "name": "triggerType",
- "type": "triggerType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": false,
- "default": "'push'"
- },
- "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
- },
- "watchPaths": {
- "name": "watchPaths",
- "type": "text[]",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "giteaId": {
- "name": "giteaId",
- "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_giteaId_gitea_giteaId_fk": {
- "name": "compose_giteaId_gitea_giteaId_fk",
- "tableFrom": "compose",
- "tableTo": "gitea",
- "columnsFrom": [
- "giteaId"
- ],
- "columnsTo": [
- "giteaId"
- ],
- "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
- },
- "messageThreadId": {
- "name": "messageThreadId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "userId": {
- "name": "userId",
- "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"
- },
- "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.gitea": {
- "name": "gitea",
- "schema": "",
- "columns": {
- "giteaId": {
- "name": "giteaId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "giteaUrl": {
- "name": "giteaUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "'https://gitea.com'"
- },
- "redirect_uri": {
- "name": "redirect_uri",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_id": {
- "name": "client_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "client_secret": {
- "name": "client_secret",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "gitProviderId": {
- "name": "gitProviderId",
- "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
- },
- "expires_at": {
- "name": "expires_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "scopes": {
- "name": "scopes",
- "type": "text",
- "primaryKey": false,
- "notNull": false,
- "default": "'repo,repo:status,read:user,read:org'"
- },
- "last_authenticated_at": {
- "name": "last_authenticated_at",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "gitea_gitProviderId_git_provider_gitProviderId_fk": {
- "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
- "tableFrom": "gitea",
- "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.ai": {
- "name": "ai",
- "schema": "",
- "columns": {
- "aiId": {
- "name": "aiId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiUrl": {
- "name": "apiUrl",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "apiKey": {
- "name": "apiKey",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "model": {
- "name": "model",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "isEnabled": {
- "name": "isEnabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "organizationId": {
- "name": "organizationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "ai_organizationId_organization_id_fk": {
- "name": "ai_organizationId_organization_id_fk",
- "tableFrom": "ai",
- "tableTo": "organization",
- "columnsFrom": [
- "organizationId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "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.apikey": {
- "name": "apikey",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "start": {
- "name": "start",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "key": {
- "name": "key",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "refill_interval": {
- "name": "refill_interval",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "refill_amount": {
- "name": "refill_amount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_refill_at": {
- "name": "last_refill_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_enabled": {
- "name": "rate_limit_enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_time_window": {
- "name": "rate_limit_time_window",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "rate_limit_max": {
- "name": "rate_limit_max",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "request_count": {
- "name": "request_count",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "remaining": {
- "name": "remaining",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "last_request": {
- "name": "last_request",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "expires_at": {
- "name": "expires_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": false
- },
- "created_at": {
- "name": "created_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "updated_at": {
- "name": "updated_at",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true
- },
- "permissions": {
- "name": "permissions",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "metadata": {
- "name": "metadata",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "apikey_user_id_user_temp_id_fk": {
- "name": "apikey_user_id_user_temp_id_fk",
- "tableFrom": "apikey",
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- }
- },
- "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
- },
- "team_id": {
- "name": "team_id",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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": "cascade",
- "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": "cascade",
- "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
- },
- "public.schedule": {
- "name": "schedule",
- "schema": "",
- "columns": {
- "scheduleId": {
- "name": "scheduleId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "shellType": {
- "name": "shellType",
- "type": "shellType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'bash'"
- },
- "scheduleType": {
- "name": "scheduleType",
- "type": "scheduleType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "command": {
- "name": "command",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "script": {
- "name": "script",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "userId": {
- "name": "userId",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": true
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "schedule_applicationId_application_applicationId_fk": {
- "name": "schedule_applicationId_application_applicationId_fk",
- "tableFrom": "schedule",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_composeId_compose_composeId_fk": {
- "name": "schedule_composeId_compose_composeId_fk",
- "tableFrom": "schedule",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_serverId_server_serverId_fk": {
- "name": "schedule_serverId_server_serverId_fk",
- "tableFrom": "schedule",
- "tableTo": "server",
- "columnsFrom": [
- "serverId"
- ],
- "columnsTo": [
- "serverId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "schedule_userId_user_temp_id_fk": {
- "name": "schedule_userId_user_temp_id_fk",
- "tableFrom": "schedule",
- "tableTo": "user_temp",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "deploymentId": {
- "name": "deploymentId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "version": {
- "name": "version",
- "type": "serial",
- "primaryKey": false,
- "notNull": true
- },
- "image": {
- "name": "image",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "fullContext": {
- "name": "fullContext",
- "type": "jsonb",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {
- "rollback_deploymentId_deployment_deploymentId_fk": {
- "name": "rollback_deploymentId_deployment_deploymentId_fk",
- "tableFrom": "rollback",
- "tableTo": "deployment",
- "columnsFrom": [
- "deploymentId"
- ],
- "columnsTo": [
- "deploymentId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.volume_backup": {
- "name": "volume_backup",
- "schema": "",
- "columns": {
- "volumeBackupId": {
- "name": "volumeBackupId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "volumeName": {
- "name": "volumeName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "prefix": {
- "name": "prefix",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceType": {
- "name": "serviceType",
- "type": "serviceType",
- "typeSchema": "public",
- "primaryKey": false,
- "notNull": true,
- "default": "'application'"
- },
- "appName": {
- "name": "appName",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "serviceName": {
- "name": "serviceName",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "turnOff": {
- "name": "turnOff",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "cronExpression": {
- "name": "cronExpression",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "keepLatestCount": {
- "name": "keepLatestCount",
- "type": "integer",
- "primaryKey": false,
- "notNull": false
- },
- "enabled": {
- "name": "enabled",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false
- },
- "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
- },
- "createdAt": {
- "name": "createdAt",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- },
- "destinationId": {
- "name": "destinationId",
- "type": "text",
- "primaryKey": false,
- "notNull": true
- }
- },
- "indexes": {},
- "foreignKeys": {
- "volume_backup_applicationId_application_applicationId_fk": {
- "name": "volume_backup_applicationId_application_applicationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "application",
- "columnsFrom": [
- "applicationId"
- ],
- "columnsTo": [
- "applicationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_postgresId_postgres_postgresId_fk": {
- "name": "volume_backup_postgresId_postgres_postgresId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "postgres",
- "columnsFrom": [
- "postgresId"
- ],
- "columnsTo": [
- "postgresId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mariadbId_mariadb_mariadbId_fk": {
- "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mariadb",
- "columnsFrom": [
- "mariadbId"
- ],
- "columnsTo": [
- "mariadbId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mongoId_mongo_mongoId_fk": {
- "name": "volume_backup_mongoId_mongo_mongoId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mongo",
- "columnsFrom": [
- "mongoId"
- ],
- "columnsTo": [
- "mongoId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_mysqlId_mysql_mysqlId_fk": {
- "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "mysql",
- "columnsFrom": [
- "mysqlId"
- ],
- "columnsTo": [
- "mysqlId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_redisId_redis_redisId_fk": {
- "name": "volume_backup_redisId_redis_redisId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "redis",
- "columnsFrom": [
- "redisId"
- ],
- "columnsTo": [
- "redisId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_composeId_compose_composeId_fk": {
- "name": "volume_backup_composeId_compose_composeId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "compose",
- "columnsFrom": [
- "composeId"
- ],
- "columnsTo": [
- "composeId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- },
- "volume_backup_destinationId_destination_destinationId_fk": {
- "name": "volume_backup_destinationId_destination_destinationId_fk",
- "tableFrom": "volume_backup",
- "tableTo": "destination",
- "columnsFrom": [
- "destinationId"
- ],
- "columnsTo": [
- "destinationId"
- ],
- "onDelete": "cascade",
- "onUpdate": "no action"
- }
- },
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {
- "public.buildType": {
- "name": "buildType",
- "schema": "public",
- "values": [
- "dockerfile",
- "heroku_buildpacks",
- "paketo_buildpacks",
- "nixpacks",
- "static",
- "railpack"
- ]
- },
- "public.sourceType": {
- "name": "sourceType",
- "schema": "public",
- "values": [
- "docker",
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "drop"
- ]
- },
- "public.domainType": {
- "name": "domainType",
- "schema": "public",
- "values": [
- "compose",
- "application",
- "preview"
- ]
- },
- "public.backupType": {
- "name": "backupType",
- "schema": "public",
- "values": [
- "database",
- "compose"
- ]
- },
- "public.databaseType": {
- "name": "databaseType",
- "schema": "public",
- "values": [
- "postgres",
- "mariadb",
- "mysql",
- "mongo",
- "web-server"
- ]
- },
- "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.publishModeType": {
- "name": "publishModeType",
- "schema": "public",
- "values": [
- "ingress",
- "host"
- ]
- },
- "public.applicationStatus": {
- "name": "applicationStatus",
- "schema": "public",
- "values": [
- "idle",
- "running",
- "done",
- "error"
- ]
- },
- "public.certificateType": {
- "name": "certificateType",
- "schema": "public",
- "values": [
- "letsencrypt",
- "none",
- "custom"
- ]
- },
- "public.triggerType": {
- "name": "triggerType",
- "schema": "public",
- "values": [
- "push",
- "tag"
- ]
- },
- "public.composeType": {
- "name": "composeType",
- "schema": "public",
- "values": [
- "docker-compose",
- "stack"
- ]
- },
- "public.sourceTypeCompose": {
- "name": "sourceTypeCompose",
- "schema": "public",
- "values": [
- "git",
- "github",
- "gitlab",
- "bitbucket",
- "gitea",
- "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",
- "gitea"
- ]
- },
- "public.serverStatus": {
- "name": "serverStatus",
- "schema": "public",
- "values": [
- "active",
- "inactive"
- ]
- },
- "public.scheduleType": {
- "name": "scheduleType",
- "schema": "public",
- "values": [
- "application",
- "compose",
- "server",
- "dokploy-server"
- ]
- },
- "public.shellType": {
- "name": "shellType",
- "schema": "public",
- "values": [
- "bash",
- "sh"
- ]
- }
- },
- "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 988a6d1ab..f981a42cc 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -701,13 +701,6 @@
"when": 1751693569786,
"tag": "0099_wise_golden_guardian",
"breakpoints": true
- },
- {
- "idx": 100,
- "version": "7",
- "when": 1751695554830,
- "tag": "0100_dizzy_jackal",
- "breakpoints": true
}
]
}
\ No newline at end of file
From c59ea5781421d90aa3d479caae371caea7dda908 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 15:40:57 -0600
Subject: [PATCH 46/56] feat(database): add volume_backup table and update
deployment schema
- Introduced a new "volume_backup" table to manage volume backup configurations, including fields for various database IDs and backup settings.
- Updated the "deployment" table to include a foreign key reference to the new "volume_backup" table.
- Added foreign key constraints to ensure data integrity across related tables.
- Updated journal and snapshot files to reflect these changes, enhancing the database schema for better backup management.
---
.../drizzle/0101_moaning_blazing_skull.sql | 33 +
apps/dokploy/drizzle/meta/0101_snapshot.json | 6122 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
3 files changed, 6162 insertions(+)
create mode 100644 apps/dokploy/drizzle/0101_moaning_blazing_skull.sql
create mode 100644 apps/dokploy/drizzle/meta/0101_snapshot.json
diff --git a/apps/dokploy/drizzle/0101_moaning_blazing_skull.sql b/apps/dokploy/drizzle/0101_moaning_blazing_skull.sql
new file mode 100644
index 000000000..91674ee2c
--- /dev/null
+++ b/apps/dokploy/drizzle/0101_moaning_blazing_skull.sql
@@ -0,0 +1,33 @@
+CREATE TABLE "volume_backup" (
+ "volumeBackupId" text PRIMARY KEY NOT NULL,
+ "name" text NOT NULL,
+ "volumeName" text NOT NULL,
+ "prefix" text NOT NULL,
+ "serviceType" "serviceType" DEFAULT 'application' NOT NULL,
+ "appName" text NOT NULL,
+ "serviceName" text,
+ "turnOff" boolean DEFAULT false NOT NULL,
+ "cronExpression" text NOT NULL,
+ "keepLatestCount" integer,
+ "enabled" boolean,
+ "applicationId" text,
+ "postgresId" text,
+ "mariadbId" text,
+ "mongoId" text,
+ "mysqlId" text,
+ "redisId" text,
+ "composeId" text,
+ "createdAt" text NOT NULL,
+ "destinationId" text NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "deployment" ADD COLUMN "volumeBackupId" text;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_postgresId_postgres_postgresId_fk" FOREIGN KEY ("postgresId") REFERENCES "public"."postgres"("postgresId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mariadbId_mariadb_mariadbId_fk" FOREIGN KEY ("mariadbId") REFERENCES "public"."mariadb"("mariadbId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mongoId_mongo_mongoId_fk" FOREIGN KEY ("mongoId") REFERENCES "public"."mongo"("mongoId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_mysqlId_mysql_mysqlId_fk" FOREIGN KEY ("mysqlId") REFERENCES "public"."mysql"("mysqlId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_redisId_redis_redisId_fk" FOREIGN KEY ("redisId") REFERENCES "public"."redis"("redisId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "volume_backup" ADD CONSTRAINT "volume_backup_destinationId_destination_destinationId_fk" FOREIGN KEY ("destinationId") REFERENCES "public"."destination"("destinationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "deployment" ADD CONSTRAINT "deployment_volumeBackupId_volume_backup_volumeBackupId_fk" FOREIGN KEY ("volumeBackupId") REFERENCES "public"."volume_backup"("volumeBackupId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0101_snapshot.json b/apps/dokploy/drizzle/meta/0101_snapshot.json
new file mode 100644
index 000000000..c035a435d
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0101_snapshot.json
@@ -0,0 +1,6122 @@
+{
+ "id": "69f87478-2c7c-4e43-ad98-7718bcd91259",
+ "prevId": "abe187f7-21c6-47c4-9492-038e866ded60",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "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
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 ecd86c92e..59c3cf125 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -708,6 +708,13 @@
"when": 1751741736144,
"tag": "0100_purple_rogue",
"breakpoints": true
+ },
+ {
+ "idx": 101,
+ "version": "7",
+ "when": 1751751631943,
+ "tag": "0101_moaning_blazing_skull",
+ "breakpoints": true
}
]
}
\ No newline at end of file
From 80ede659fb736f239214a6b2f89cf5e286e796fc Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 16:00:01 -0600
Subject: [PATCH 47/56] feat(volume-backups): enhance volume backup display
with restore functionality
- Wrapped the volume backup handling component with a fragment to include the restore functionality.
- Added a new div for better layout and organization of the volume backup and restore components, improving user experience.
---
.../volume-backups/show-volume-backups.tsx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
index 56223f3bf..bb071947e 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx
@@ -76,11 +76,18 @@ export const ShowVolumeBackups = ({
{volumeBackups && volumeBackups.length > 0 && (
-
+ <>
+
+
+
+
+
+ >
)}
-
-
-
From d3702d22f223ca0e1bc2df1ca006a37639a17991 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 16:47:44 -0600
Subject: [PATCH 48/56] refactor(application): remove redundant service stop
logic
- Eliminated the conditional logic for stopping services based on serverId, streamlining the application status update process.
- This change enhances code clarity and maintains focus on application state management.
---
apps/dokploy/server/api/routers/application.ts | 6 ------
1 file changed, 6 deletions(-)
diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts
index dfdf71d07..fed80ef80 100644
--- a/apps/dokploy/server/api/routers/application.ts
+++ b/apps/dokploy/server/api/routers/application.ts
@@ -184,12 +184,6 @@ export const applicationRouter = createTRPCRouter({
});
}
- if (application.serverId) {
- await stopServiceRemote(application.serverId, input.appName);
- } else {
- await stopService(input.appName);
- }
-
await updateApplicationStatus(input.applicationId, "idle");
await mechanizeDockerContainer(application);
await updateApplicationStatus(input.applicationId, "done");
From 75b2c34a135b5cf7430b09f7a63c8d92cdc1b7df Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 17:06:39 -0600
Subject: [PATCH 49/56] feat(api): implement lazy WebSocket client for improved
connection management
- Introduced a `createLazyWSClient` function to manage WebSocket connections more efficiently by delaying the creation of the client until it's needed.
- Updated the `wsClient` initialization to use the new lazy client, enhancing performance and resource management in the application.
---
apps/dokploy/utils/api.ts | 41 +++++++++++++++++++++++++++++++++------
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/apps/dokploy/utils/api.ts b/apps/dokploy/utils/api.ts
index 56197528b..4de5fe036 100644
--- a/apps/dokploy/utils/api.ts
+++ b/apps/dokploy/utils/api.ts
@@ -30,12 +30,41 @@ const getWsUrl = () => {
return `${protocol}${host}/drawer-logs`;
};
-const wsClient =
- typeof window !== "undefined"
- ? createWSClient({
- url: getWsUrl() || "",
- })
- : null;
+// Create WebSocket client with delayed connection
+const createLazyWSClient = () => {
+ if (typeof window === "undefined") return null;
+
+ let actualClient: ReturnType | null = null;
+
+ return {
+ request: (op: any, callbacks: any) => {
+ if (!actualClient) {
+ const wsUrl = getWsUrl();
+ if (wsUrl) {
+ actualClient = createWSClient({ url: wsUrl });
+ }
+ }
+ return actualClient?.request(op, callbacks) || (() => {});
+ },
+ close: () => {
+ if (actualClient) {
+ actualClient.close();
+ actualClient = null;
+ }
+ },
+ getConnection: () => {
+ if (!actualClient) {
+ const wsUrl = getWsUrl();
+ if (wsUrl) {
+ actualClient = createWSClient({ url: wsUrl });
+ }
+ }
+ return actualClient!.getConnection();
+ },
+ };
+};
+
+const wsClient = createLazyWSClient();
/** A set of type-safe react-query hooks for your tRPC API. */
export const api = createTRPCNext({
From 5ec3d63ab272bf758da209885159c5f8768ce2d9 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 5 Jul 2025 17:17:51 -0600
Subject: [PATCH 50/56] feat(volumes): add alert block for bind mount
validation in AddVolumes component
- Introduced an AlertBlock to provide users with warnings about host path validity and potential deployment issues when using bind mounts in the AddVolumes component.
- This enhancement improves user experience by ensuring users are informed of important considerations when configuring volumes.
---
.../advanced/volumes/add-volumes.tsx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
index 718f98b72..639410bb4 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
@@ -1,3 +1,4 @@
+import { AlertBlock } from "@/components/shared/alert-block";
import { CodeEditor } from "@/components/shared/code-editor";
import { Button } from "@/components/ui/button";
import {
@@ -169,6 +170,23 @@ export const AddVolumes = ({
onSubmit={form.handleSubmit(onSubmit)}
className="grid w-full gap-8 "
>
+ {type === "bind" && (
+
+
+
+ Make sure the host path is a valid path and exists in the
+ host machine.
+
+
+ Cluster Warning: If you're using cluster
+ features, bind mounts may cause deployment failures since
+ the path must exist on all worker/manager nodes. Consider
+ using external tools to distribute the folder across nodes
+ or use named volumes instead.
+
+
+
+ )}
Date: Sun, 6 Jul 2025 13:56:58 -0600
Subject: [PATCH 51/56] fix(gitlab): update repository selection to use URL
instead of name
- Changed the repository selection logic in SaveGitlabProvider and SaveGitlabProviderCompose components to use the repository URL for better accuracy.
- Updated the condition for displaying the selected repository in the CheckIcon component to compare against the gitlabPathNamespace instead of the repository name.
- Refactored the getGitlabRepositories function to simplify the group name check logic.
---
.../application/general/generic/save-gitlab-provider.tsx | 5 +++--
.../compose/general/generic/save-gitlab-provider-compose.tsx | 5 +++--
packages/server/src/utils/providers/gitlab.ts | 4 +---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
index b4f27da74..3b054fc99 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
@@ -278,7 +278,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
{repositories?.map((repo) => {
return (
{
form.setValue("repository", {
@@ -299,7 +299,8 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
{
{repositories?.map((repo) => {
return (
{
form.setValue("repository", {
@@ -301,7 +301,8 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
{
const groupName = gitlabProvider.groupName?.toLowerCase();
if (groupName) {
- const isIncluded = groupName
+ return groupName
.split(",")
.some((name) =>
full_path.toLowerCase().startsWith(name.trim().toLowerCase()),
);
-
- return isIncluded && kind === "group";
}
return kind === "user";
});
From 078ca19578075edd4a903bc329c89d22924141ba Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 6 Jul 2025 16:43:44 -0600
Subject: [PATCH 52/56] feat(rollbacks): enhance rollback functionality with
full context support
- Updated the rollbacks schema to include mounts, ports, and optional registry information in the full context.
- Refactored the rollback service to utilize the full context for improved rollback operations, ensuring all necessary configurations are applied.
- Exported the getAuthConfig function for better accessibility in the application context.
---
packages/server/src/db/schema/rollbacks.ts | 12 ++-
packages/server/src/services/rollbacks.ts | 105 ++++++++++++++++++--
packages/server/src/utils/builders/index.ts | 2 +-
3 files changed, 107 insertions(+), 12 deletions(-)
diff --git a/packages/server/src/db/schema/rollbacks.ts b/packages/server/src/db/schema/rollbacks.ts
index 7a8606873..4947b19c2 100644
--- a/packages/server/src/db/schema/rollbacks.ts
+++ b/packages/server/src/db/schema/rollbacks.ts
@@ -6,6 +6,9 @@ import { z } from "zod";
import { deployments } from "./deployment";
import type { Application } from "@dokploy/server/services/application";
import type { Project } from "@dokploy/server/services/project";
+import type { Mount } from "@dokploy/server/services/mount";
+import type { Port } from "@dokploy/server/services/port";
+import type { Registry } from "@dokploy/server/services/registry";
export const rollbacks = pgTable("rollback", {
rollbackId: text("rollbackId")
@@ -22,7 +25,14 @@ export const rollbacks = pgTable("rollback", {
createdAt: text("createdAt")
.notNull()
.$defaultFn(() => new Date().toISOString()),
- fullContext: jsonb("fullContext").$type(),
+ fullContext: jsonb("fullContext").$type<
+ Application & {
+ project: Project;
+ mounts: Mount[];
+ ports: Port[];
+ registry?: Registry | null;
+ }
+ >(),
});
export type Rollback = typeof rollbacks.$inferSelect;
diff --git a/packages/server/src/services/rollbacks.ts b/packages/server/src/services/rollbacks.ts
index c8e74a165..88ee24a6d 100644
--- a/packages/server/src/services/rollbacks.ts
+++ b/packages/server/src/services/rollbacks.ts
@@ -6,13 +6,22 @@ import {
deployments as deploymentsSchema,
} from "../db/schema";
import type { z } from "zod";
-import { findApplicationById } from "./application";
+import { type Application, findApplicationById } from "./application";
import { getRemoteDocker } from "../utils/servers/remote-docker";
-import type { ApplicationNested } from "../utils/builders";
+import { getAuthConfig, type ApplicationNested } from "../utils/builders";
import { execAsync, execAsyncRemote } from "../utils/process/execAsync";
import type { CreateServiceOptions } from "dockerode";
import { findDeploymentById } from "./deployment";
-import { prepareEnvironmentVariables } from "../utils/docker/utils";
+import {
+ prepareEnvironmentVariables,
+ calculateResources,
+ generateBindMounts,
+ generateConfigContainer,
+ generateVolumeMounts,
+} from "../utils/docker/utils";
+import type { Project } from "./project";
+import type { Mount } from "./mount";
+import type { Port } from "./port";
export const createRollback = async (
input: z.infer,
@@ -152,16 +161,16 @@ export const rollback = async (rollbackId: string) => {
const application = await findApplicationById(deployment.applicationId);
- const envVariables = prepareEnvironmentVariables(
- result?.fullContext?.env || "",
- result.fullContext?.project?.env || "",
- );
+ if (!result.fullContext) {
+ throw new Error("Rollback context not found");
+ }
+ // Use the full context for rollback
await rollbackApplication(
application.appName,
result.image || "",
application.serverId,
- envVariables,
+ result.fullContext,
);
};
@@ -169,18 +178,94 @@ const rollbackApplication = async (
appName: string,
image: string,
serverId?: string | null,
- env: string[] = [],
+ fullContext?: Application & {
+ project: Project;
+ mounts: Mount[];
+ ports: Port[];
+ },
) => {
+ if (!fullContext) {
+ throw new Error("Full context is required for rollback");
+ }
+
const docker = await getRemoteDocker(serverId);
+ // Use the same configuration as mechanizeDockerContainer
+ const {
+ env,
+ mounts,
+ cpuLimit,
+ memoryLimit,
+ memoryReservation,
+ cpuReservation,
+ command,
+ ports,
+ } = fullContext;
+
+ const resources = calculateResources({
+ memoryLimit,
+ memoryReservation,
+ cpuLimit,
+ cpuReservation,
+ });
+
+ const volumesMount = generateVolumeMounts(mounts);
+
+ const {
+ HealthCheck,
+ RestartPolicy,
+ Placement,
+ Labels,
+ Mode,
+ RollbackConfig,
+ UpdateConfig,
+ Networks,
+ } = generateConfigContainer(fullContext as ApplicationNested);
+
+ const bindsMount = generateBindMounts(mounts);
+ const envVariables = prepareEnvironmentVariables(
+ env,
+ fullContext.project.env,
+ );
+
+ // For rollback, we use the provided image instead of calculating it
+ const authConfig = getAuthConfig(fullContext as ApplicationNested);
+
const settings: CreateServiceOptions = {
+ authconfig: authConfig,
Name: appName,
TaskTemplate: {
ContainerSpec: {
+ HealthCheck,
Image: image,
- Env: env,
+ Env: envVariables,
+ Mounts: [...volumesMount, ...bindsMount],
+ ...(command
+ ? {
+ Command: ["/bin/sh"],
+ Args: ["-c", command],
+ }
+ : {}),
+ Labels,
+ },
+ Networks,
+ RestartPolicy,
+ Placement,
+ Resources: {
+ ...resources,
},
},
+ Mode,
+ RollbackConfig,
+ EndpointSpec: {
+ Ports: ports.map((port) => ({
+ PublishMode: port.publishMode,
+ Protocol: port.protocol,
+ TargetPort: port.targetPort,
+ PublishedPort: port.publishedPort,
+ })),
+ },
+ UpdateConfig,
};
try {
diff --git a/packages/server/src/utils/builders/index.ts b/packages/server/src/utils/builders/index.ts
index 93283f440..b779558ef 100644
--- a/packages/server/src/utils/builders/index.ts
+++ b/packages/server/src/utils/builders/index.ts
@@ -227,7 +227,7 @@ const getImageName = (application: ApplicationNested) => {
return imageName;
};
-const getAuthConfig = (application: ApplicationNested) => {
+export const getAuthConfig = (application: ApplicationNested) => {
const { registry, username, password, sourceType, registryUrl } = application;
if (sourceType === "docker") {
From 46e0b5df758248ffda5b5cf5d83c111111160f63 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 6 Jul 2025 17:57:22 -0600
Subject: [PATCH 53/56] Update package.json
---
apps/dokploy/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index 2ec63a78e..054e74f35 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -1,6 +1,6 @@
{
"name": "dokploy",
- "version": "v0.23.7",
+ "version": "v0.24.0",
"private": true,
"license": "Apache-2.0",
"type": "module",
From 76603f598c8dd10696108b5eac3584f0670fb93b Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 6 Jul 2025 18:46:36 -0600
Subject: [PATCH 54/56] feat(database): add isolatedDeploymentsVolume column to
compose table
- Introduced a new boolean column "isolatedDeploymentsVolume" to the "compose" table with a default value of false.
- Updated existing records to set "isolatedDeploymentsVolume" to true.
- Modified related functions to handle the new column for improved deployment isolation management.
---
.../drizzle/0102_opposite_grandmaster.sql | 3 +
apps/dokploy/drizzle/meta/0102_snapshot.json | 6129 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
packages/server/src/db/schema/compose.ts | 4 +
packages/server/src/utils/docker/collision.ts | 13 +-
packages/server/src/utils/docker/domain.ts | 1 +
6 files changed, 6156 insertions(+), 1 deletion(-)
create mode 100644 apps/dokploy/drizzle/0102_opposite_grandmaster.sql
create mode 100644 apps/dokploy/drizzle/meta/0102_snapshot.json
diff --git a/apps/dokploy/drizzle/0102_opposite_grandmaster.sql b/apps/dokploy/drizzle/0102_opposite_grandmaster.sql
new file mode 100644
index 000000000..8f7334d4d
--- /dev/null
+++ b/apps/dokploy/drizzle/0102_opposite_grandmaster.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "compose" ADD COLUMN "isolatedDeploymentsVolume" boolean DEFAULT false NOT NULL;
+
+UPDATE "compose" SET "isolatedDeploymentsVolume" = true;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0102_snapshot.json b/apps/dokploy/drizzle/meta/0102_snapshot.json
new file mode 100644
index 000000000..e87babc76
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0102_snapshot.json
@@ -0,0 +1,6129 @@
+{
+ "id": "218e3c9b-ef86-4665-98af-56d65282b73b",
+ "prevId": "69f87478-2c7c-4e43-ad98-7718bcd91259",
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "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'"
+ },
+ "previewCustomCertResolver": {
+ "name": "previewCustomCertResolver",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "previewLimit": {
+ "name": "previewLimit",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3
+ },
+ "isPreviewDeploymentsActive": {
+ "name": "isPreviewDeploymentsActive",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "rollbackActive": {
+ "name": "rollbackActive",
+ "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'"
+ },
+ "cleanCache": {
+ "name": "cleanCache",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "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": "'/'"
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBuildPath": {
+ "name": "giteaBuildPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "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
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 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
+ },
+ "isStaticSpa": {
+ "name": "isStaticSpa",
+ "type": "boolean",
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "application_giteaId_gitea_giteaId_fk",
+ "tableFrom": "application",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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": "''"
+ },
+ "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'"
+ },
+ "https": {
+ "name": "https",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "logCleanupCron": {
+ "name": "logCleanupCron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'0 0 * * *'"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'user'"
+ },
+ "enablePaidFeatures": {
+ "name": "enablePaidFeatures",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "allowImpersonation": {
+ "name": "allowImpersonation",
+ "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
+ },
+ "customCertResolver": {
+ "name": "customCertResolver",
+ "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'"
+ },
+ "internalPath": {
+ "name": "internalPath",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'/'"
+ },
+ "stripPath": {
+ "name": "stripPath",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "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
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "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
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupType": {
+ "name": "backupType",
+ "type": "backupType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'database'"
+ },
+ "databaseType": {
+ "name": "databaseType",
+ "type": "databaseType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "composeId": {
+ "name": "composeId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "jsonb",
+ "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_composeId_compose_composeId_fk": {
+ "name": "backup_composeId_compose_composeId_fk",
+ "tableFrom": "backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "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"
+ },
+ "backup_userId_user_temp_id_fk": {
+ "name": "backup_userId_user_temp_id_fk",
+ "tableFrom": "backup",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "backup_appName_unique": {
+ "name": "backup_appName_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "appName"
+ ]
+ }
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "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
+ },
+ "pid": {
+ "name": "pid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finishedAt": {
+ "name": "finishedAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "errorMessage": {
+ "name": "errorMessage",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backupId": {
+ "name": "backupId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "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"
+ },
+ "deployment_scheduleId_schedule_scheduleId_fk": {
+ "name": "deployment_scheduleId_schedule_scheduleId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "schedule",
+ "columnsFrom": [
+ "scheduleId"
+ ],
+ "columnsTo": [
+ "scheduleId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_backupId_backup_backupId_fk": {
+ "name": "deployment_backupId_backup_backupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "backup",
+ "columnsFrom": [
+ "backupId"
+ ],
+ "columnsTo": [
+ "backupId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_rollbackId_rollback_rollbackId_fk": {
+ "name": "deployment_rollbackId_rollback_rollbackId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "rollback",
+ "columnsFrom": [
+ "rollbackId"
+ ],
+ "columnsTo": [
+ "rollbackId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "deployment_volumeBackupId_volume_backup_volumeBackupId_fk": {
+ "name": "deployment_volumeBackupId_volume_backup_volumeBackupId_fk",
+ "tableFrom": "deployment",
+ "tableTo": "volume_backup",
+ "columnsFrom": [
+ "volumeBackupId"
+ ],
+ "columnsTo": [
+ "volumeBackupId"
+ ],
+ "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
+ },
+ "publishMode": {
+ "name": "publishMode",
+ "type": "publishModeType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'host'"
+ },
+ "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
+ },
+ "giteaRepository": {
+ "name": "giteaRepository",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaOwner": {
+ "name": "giteaOwner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "giteaBranch": {
+ "name": "giteaBranch",
+ "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": "''"
+ },
+ "enableSubmodules": {
+ "name": "enableSubmodules",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "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
+ },
+ "isolatedDeploymentsVolume": {
+ "name": "isolatedDeploymentsVolume",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "triggerType": {
+ "name": "triggerType",
+ "type": "triggerType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'push'"
+ },
+ "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
+ },
+ "watchPaths": {
+ "name": "watchPaths",
+ "type": "text[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "giteaId": {
+ "name": "giteaId",
+ "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_giteaId_gitea_giteaId_fk": {
+ "name": "compose_giteaId_gitea_giteaId_fk",
+ "tableFrom": "compose",
+ "tableTo": "gitea",
+ "columnsFrom": [
+ "giteaId"
+ ],
+ "columnsTo": [
+ "giteaId"
+ ],
+ "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
+ },
+ "messageThreadId": {
+ "name": "messageThreadId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "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"
+ },
+ "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.gitea": {
+ "name": "gitea",
+ "schema": "",
+ "columns": {
+ "giteaId": {
+ "name": "giteaId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "giteaUrl": {
+ "name": "giteaUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'https://gitea.com'"
+ },
+ "redirect_uri": {
+ "name": "redirect_uri",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gitProviderId": {
+ "name": "gitProviderId",
+ "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
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'repo,repo:status,read:user,read:org'"
+ },
+ "last_authenticated_at": {
+ "name": "last_authenticated_at",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "gitea_gitProviderId_git_provider_gitProviderId_fk": {
+ "name": "gitea_gitProviderId_git_provider_gitProviderId_fk",
+ "tableFrom": "gitea",
+ "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.ai": {
+ "name": "ai",
+ "schema": "",
+ "columns": {
+ "aiId": {
+ "name": "aiId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiUrl": {
+ "name": "apiUrl",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "apiKey": {
+ "name": "apiKey",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "isEnabled": {
+ "name": "isEnabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "organizationId": {
+ "name": "organizationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ai_organizationId_organization_id_fk": {
+ "name": "ai_organizationId_organization_id_fk",
+ "tableFrom": "ai",
+ "tableTo": "organization",
+ "columnsFrom": [
+ "organizationId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "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.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "apikey_user_id_user_temp_id_fk": {
+ "name": "apikey_user_id_user_temp_id_fk",
+ "tableFrom": "apikey",
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "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
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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": "cascade",
+ "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": "cascade",
+ "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
+ },
+ "public.schedule": {
+ "name": "schedule",
+ "schema": "",
+ "columns": {
+ "scheduleId": {
+ "name": "scheduleId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shellType": {
+ "name": "shellType",
+ "type": "shellType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'bash'"
+ },
+ "scheduleType": {
+ "name": "scheduleType",
+ "type": "scheduleType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "script": {
+ "name": "script",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "userId": {
+ "name": "userId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "schedule_applicationId_application_applicationId_fk": {
+ "name": "schedule_applicationId_application_applicationId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_composeId_compose_composeId_fk": {
+ "name": "schedule_composeId_compose_composeId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_serverId_server_serverId_fk": {
+ "name": "schedule_serverId_server_serverId_fk",
+ "tableFrom": "schedule",
+ "tableTo": "server",
+ "columnsFrom": [
+ "serverId"
+ ],
+ "columnsTo": [
+ "serverId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "schedule_userId_user_temp_id_fk": {
+ "name": "schedule_userId_user_temp_id_fk",
+ "tableFrom": "schedule",
+ "tableTo": "user_temp",
+ "columnsFrom": [
+ "userId"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.rollback": {
+ "name": "rollback",
+ "schema": "",
+ "columns": {
+ "rollbackId": {
+ "name": "rollbackId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "deploymentId": {
+ "name": "deploymentId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "version": {
+ "name": "version",
+ "type": "serial",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fullContext": {
+ "name": "fullContext",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "rollback_deploymentId_deployment_deploymentId_fk": {
+ "name": "rollback_deploymentId_deployment_deploymentId_fk",
+ "tableFrom": "rollback",
+ "tableTo": "deployment",
+ "columnsFrom": [
+ "deploymentId"
+ ],
+ "columnsTo": [
+ "deploymentId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.volume_backup": {
+ "name": "volume_backup",
+ "schema": "",
+ "columns": {
+ "volumeBackupId": {
+ "name": "volumeBackupId",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "volumeName": {
+ "name": "volumeName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceType": {
+ "name": "serviceType",
+ "type": "serviceType",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'application'"
+ },
+ "appName": {
+ "name": "appName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "serviceName": {
+ "name": "serviceName",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "turnOff": {
+ "name": "turnOff",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cronExpression": {
+ "name": "cronExpression",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "keepLatestCount": {
+ "name": "keepLatestCount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "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
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "destinationId": {
+ "name": "destinationId",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "volume_backup_applicationId_application_applicationId_fk": {
+ "name": "volume_backup_applicationId_application_applicationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "application",
+ "columnsFrom": [
+ "applicationId"
+ ],
+ "columnsTo": [
+ "applicationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_postgresId_postgres_postgresId_fk": {
+ "name": "volume_backup_postgresId_postgres_postgresId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "postgres",
+ "columnsFrom": [
+ "postgresId"
+ ],
+ "columnsTo": [
+ "postgresId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mariadbId_mariadb_mariadbId_fk": {
+ "name": "volume_backup_mariadbId_mariadb_mariadbId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mariadb",
+ "columnsFrom": [
+ "mariadbId"
+ ],
+ "columnsTo": [
+ "mariadbId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mongoId_mongo_mongoId_fk": {
+ "name": "volume_backup_mongoId_mongo_mongoId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mongo",
+ "columnsFrom": [
+ "mongoId"
+ ],
+ "columnsTo": [
+ "mongoId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_mysqlId_mysql_mysqlId_fk": {
+ "name": "volume_backup_mysqlId_mysql_mysqlId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "mysql",
+ "columnsFrom": [
+ "mysqlId"
+ ],
+ "columnsTo": [
+ "mysqlId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_redisId_redis_redisId_fk": {
+ "name": "volume_backup_redisId_redis_redisId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "redis",
+ "columnsFrom": [
+ "redisId"
+ ],
+ "columnsTo": [
+ "redisId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_composeId_compose_composeId_fk": {
+ "name": "volume_backup_composeId_compose_composeId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "compose",
+ "columnsFrom": [
+ "composeId"
+ ],
+ "columnsTo": [
+ "composeId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "volume_backup_destinationId_destination_destinationId_fk": {
+ "name": "volume_backup_destinationId_destination_destinationId_fk",
+ "tableFrom": "volume_backup",
+ "tableTo": "destination",
+ "columnsFrom": [
+ "destinationId"
+ ],
+ "columnsTo": [
+ "destinationId"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.buildType": {
+ "name": "buildType",
+ "schema": "public",
+ "values": [
+ "dockerfile",
+ "heroku_buildpacks",
+ "paketo_buildpacks",
+ "nixpacks",
+ "static",
+ "railpack"
+ ]
+ },
+ "public.sourceType": {
+ "name": "sourceType",
+ "schema": "public",
+ "values": [
+ "docker",
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "drop"
+ ]
+ },
+ "public.domainType": {
+ "name": "domainType",
+ "schema": "public",
+ "values": [
+ "compose",
+ "application",
+ "preview"
+ ]
+ },
+ "public.backupType": {
+ "name": "backupType",
+ "schema": "public",
+ "values": [
+ "database",
+ "compose"
+ ]
+ },
+ "public.databaseType": {
+ "name": "databaseType",
+ "schema": "public",
+ "values": [
+ "postgres",
+ "mariadb",
+ "mysql",
+ "mongo",
+ "web-server"
+ ]
+ },
+ "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.publishModeType": {
+ "name": "publishModeType",
+ "schema": "public",
+ "values": [
+ "ingress",
+ "host"
+ ]
+ },
+ "public.applicationStatus": {
+ "name": "applicationStatus",
+ "schema": "public",
+ "values": [
+ "idle",
+ "running",
+ "done",
+ "error"
+ ]
+ },
+ "public.certificateType": {
+ "name": "certificateType",
+ "schema": "public",
+ "values": [
+ "letsencrypt",
+ "none",
+ "custom"
+ ]
+ },
+ "public.triggerType": {
+ "name": "triggerType",
+ "schema": "public",
+ "values": [
+ "push",
+ "tag"
+ ]
+ },
+ "public.composeType": {
+ "name": "composeType",
+ "schema": "public",
+ "values": [
+ "docker-compose",
+ "stack"
+ ]
+ },
+ "public.sourceTypeCompose": {
+ "name": "sourceTypeCompose",
+ "schema": "public",
+ "values": [
+ "git",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "gitea",
+ "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",
+ "gitea"
+ ]
+ },
+ "public.serverStatus": {
+ "name": "serverStatus",
+ "schema": "public",
+ "values": [
+ "active",
+ "inactive"
+ ]
+ },
+ "public.scheduleType": {
+ "name": "scheduleType",
+ "schema": "public",
+ "values": [
+ "application",
+ "compose",
+ "server",
+ "dokploy-server"
+ ]
+ },
+ "public.shellType": {
+ "name": "shellType",
+ "schema": "public",
+ "values": [
+ "bash",
+ "sh"
+ ]
+ }
+ },
+ "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 59c3cf125..2bfca088c 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -715,6 +715,13 @@
"when": 1751751631943,
"tag": "0101_moaning_blazing_skull",
"breakpoints": true
+ },
+ {
+ "idx": 102,
+ "version": "7",
+ "when": 1751848685503,
+ "tag": "0102_opposite_grandmaster",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/src/db/schema/compose.ts b/packages/server/src/db/schema/compose.ts
index a6fb998c8..1428fd0b8 100644
--- a/packages/server/src/db/schema/compose.ts
+++ b/packages/server/src/db/schema/compose.ts
@@ -79,6 +79,10 @@ export const compose = pgTable("compose", {
suffix: text("suffix").notNull().default(""),
randomize: boolean("randomize").notNull().default(false),
isolatedDeployment: boolean("isolatedDeployment").notNull().default(false),
+ // Keep this for backward compatibility since we will not add the prefix anymore to volumes
+ isolatedDeploymentsVolume: boolean("isolatedDeploymentsVolume")
+ .notNull()
+ .default(false),
triggerType: triggerType("triggerType").default("push"),
composeStatus: applicationStatus("composeStatus").notNull().default("idle"),
projectId: text("projectId")
diff --git a/packages/server/src/utils/docker/collision.ts b/packages/server/src/utils/docker/collision.ts
index 8d615b99b..1ef6a979c 100644
--- a/packages/server/src/utils/docker/collision.ts
+++ b/packages/server/src/utils/docker/collision.ts
@@ -1,16 +1,21 @@
import { findComposeById } from "@dokploy/server/services/compose";
import { dump, load } from "js-yaml";
import { addAppNameToAllServiceNames } from "./collision/root-network";
+import { addSuffixToAllVolumes } from "./compose/volume";
import { generateRandomHash } from "./compose";
import type { ComposeSpecification } from "./types";
export const addAppNameToPreventCollision = (
composeData: ComposeSpecification,
appName: string,
+ isolatedDeploymentsVolume: boolean,
): ComposeSpecification => {
let updatedComposeData = { ...composeData };
updatedComposeData = addAppNameToAllServiceNames(updatedComposeData, appName);
+ if (isolatedDeploymentsVolume) {
+ updatedComposeData = addSuffixToAllVolumes(updatedComposeData, appName);
+ }
return updatedComposeData;
};
@@ -27,6 +32,7 @@ export const randomizeIsolatedDeploymentComposeFile = async (
const newComposeFile = addAppNameToPreventCollision(
composeData,
randomSuffix,
+ compose.isolatedDeploymentsVolume,
);
return dump(newComposeFile);
@@ -34,11 +40,16 @@ export const randomizeIsolatedDeploymentComposeFile = async (
export const randomizeDeployableSpecificationFile = (
composeSpec: ComposeSpecification,
+ isolatedDeploymentsVolume: boolean,
suffix?: string,
) => {
if (!suffix) {
return composeSpec;
}
- const newComposeFile = addAppNameToPreventCollision(composeSpec, suffix);
+ const newComposeFile = addAppNameToPreventCollision(
+ composeSpec,
+ suffix,
+ isolatedDeploymentsVolume,
+ );
return newComposeFile;
};
diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts
index 614ce73b5..c12083345 100644
--- a/packages/server/src/utils/docker/domain.ts
+++ b/packages/server/src/utils/docker/domain.ts
@@ -202,6 +202,7 @@ export const addDomainToCompose = async (
if (compose.isolatedDeployment) {
const randomized = randomizeDeployableSpecificationFile(
result,
+ compose.isolatedDeploymentsVolume,
compose.suffix || compose.appName,
);
result = randomized;
From 4dcf6cf4c3ec77ca319b24309718412ec1db6c99 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sun, 6 Jul 2025 18:58:26 -0600
Subject: [PATCH 55/56] refactor(volume-backups): comment out keepLatestCount
field and related logic
- Commented out the keepLatestCount field in the form schema and its usage in the HandleVolumeBackups component.
- Updated related form field rendering to prevent rendering of the keepLatestCount input.
---
.../volume-backups/handle-volume-backups.tsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
index aee797e45..bebea61b8 100644
--- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
+++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx
@@ -55,7 +55,7 @@ const formSchema = z
cronExpression: z.string().min(1, "Cron expression is required"),
volumeName: z.string().min(1, "Volume name is required"),
prefix: z.string(),
- keepLatestCount: z.coerce.number().optional(),
+ // keepLatestCount: z.coerce.number().optional(),
turnOff: z.boolean().default(false),
enabled: z.boolean().default(true),
serviceType: z.enum([
@@ -117,7 +117,7 @@ export const HandleVolumeBackups = ({
cronExpression: "",
volumeName: "",
prefix: "",
- keepLatestCount: undefined,
+ // keepLatestCount: undefined,
turnOff: false,
enabled: true,
serviceName: "",
@@ -173,7 +173,7 @@ export const HandleVolumeBackups = ({
cronExpression: volumeBackup.cronExpression,
volumeName: volumeBackup.volumeName || "",
prefix: volumeBackup.prefix,
- keepLatestCount: volumeBackup.keepLatestCount || undefined,
+ // keepLatestCount: volumeBackup.keepLatestCount || undefined,
turnOff: volumeBackup.turnOff,
enabled: volumeBackup.enabled || false,
serviceName: volumeBackup.serviceName || "",
@@ -600,7 +600,7 @@ export const HandleVolumeBackups = ({
)}
/>
- (
@@ -622,7 +622,7 @@ export const HandleVolumeBackups = ({
)}
- />
+ /> */}
Date: Mon, 7 Jul 2025 10:35:31 +0900
Subject: [PATCH 56/56] docs: fix broken README.md sponsers images
---
README.md | 83 +++++++++++++++++++++++++------------------------------
1 file changed, 38 insertions(+), 45 deletions(-)
diff --git a/README.md b/README.md
index f156d3188..8c4c7c6e9 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,16 @@
-
-
-
-
-
Join us on Discord for help, feedback, and discussions!
+
+
+
+
+
Join us on Discord for help, feedback, and discussions!
-
+
Dokploy is a free, self-hostable Platform as a Service (PaaS) that simplifies the deployment and management of applications and databases.
### Features
@@ -61,55 +57,52 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
### Hero Sponsors 🎖
-
-
-
-
-
-
+
+
+
+
+
### Premium Supporters 🥇
-
-
-
-
+
+
+
-### Elite Contributors 🥈
-
-
-
-
-
-
-
-
-### Supporting Members 🥉
-
-
-
-
-
-
-
-
+### Elite Contributors 🥈
+
+
+
+### Supporting Members 🥉
+
+
### Community Backers 🤝
-
-
-
-
-
+
#### Organizations:
@@ -124,12 +117,12 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
-
+
## Video Tutorial
-
+
## Contributing