-
-
- Disconnect Repository
-
+
{
+ onDisconnect();
+ }}
+ >
+
+
+ Disconnect Repository
+
+
Disconnecting will allow you to configure a new repository with
your own git providers.
diff --git a/apps/dokploy/drizzle/0094_numerous_carmella_unuscione.sql b/apps/dokploy/drizzle/0094_numerous_carmella_unuscione.sql
new file mode 100644
index 00000000..5f259a44
--- /dev/null
+++ b/apps/dokploy/drizzle/0094_numerous_carmella_unuscione.sql
@@ -0,0 +1,15 @@
+ALTER TABLE "git_provider" ADD COLUMN "userId" text;--> statement-breakpoint
+
+-- Update existing git providers to be owned by the organization owner
+-- We need to get the account.user_id for the organization owner
+UPDATE "git_provider"
+SET "userId" = (
+ SELECT a.user_id
+ FROM "organization" o
+ JOIN "account" a ON o."owner_id" = a.user_id
+ WHERE o.id = "git_provider"."organizationId"
+);--> statement-breakpoint
+
+-- Now make the column NOT NULL since all rows should have values
+ALTER TABLE "git_provider" ALTER COLUMN "userId" SET NOT NULL;--> statement-breakpoint
+ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
\ 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 00000000..49d1a712
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0094_snapshot.json
@@ -0,0 +1,5737 @@
+{
+ "id": "ab6d4705-f0da-4949-b0dc-403abece1a3e",
+ "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'"
+ }
+ },
+ "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
+ },
+ "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
+ }
+ },
+ "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 68e36304..391799bb 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": 1750559214977,
+ "tag": "0094_numerous_carmella_unuscione",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/apps/dokploy/server/api/routers/bitbucket.ts b/apps/dokploy/server/api/routers/bitbucket.ts
index 2647f2b2..9871822f 100644
--- a/apps/dokploy/server/api/routers/bitbucket.ts
+++ b/apps/dokploy/server/api/routers/bitbucket.ts
@@ -74,11 +74,6 @@ export const bitbucketRouter = createTRPCRouter({
getBitbucketRepositories: protectedProcedure
.input(apiFindOneBitbucket)
.query(async ({ input, ctx }) => {
- console.log({
- activeOrganizationId: ctx.session.activeOrganizationId,
- userId: ctx.session.userId,
- bitbucketId: input.bitbucketId,
- });
const bitbucketProvider = await findBitbucketById(input.bitbucketId);
if (
bitbucketProvider.gitProvider.organizationId !==
diff --git a/packages/server/src/db/schema/account.ts b/packages/server/src/db/schema/account.ts
index 7db45c0d..8291ea4d 100644
--- a/packages/server/src/db/schema/account.ts
+++ b/packages/server/src/db/schema/account.ts
@@ -21,7 +21,6 @@ export const account = pgTable("account", {
providerId: text("provider_id").notNull(),
userId: text("user_id")
.notNull()
- .unique()
.references(() => users_temp.id, { onDelete: "cascade" }),
accessToken: text("access_token"),
refreshToken: text("refresh_token"),
diff --git a/packages/server/src/db/schema/git-provider.ts b/packages/server/src/db/schema/git-provider.ts
index e4259d0d..dafbc2da 100644
--- a/packages/server/src/db/schema/git-provider.ts
+++ b/packages/server/src/db/schema/git-provider.ts
@@ -3,11 +3,12 @@ import { pgEnum, pgTable, text } from "drizzle-orm/pg-core";
import { createInsertSchema } from "drizzle-zod";
import { nanoid } from "nanoid";
import { z } from "zod";
-import { account, organization } from "./account";
+import { organization } from "./account";
import { bitbucket } from "./bitbucket";
import { gitea } from "./gitea";
import { github } from "./github";
import { gitlab } from "./gitlab";
+import { users_temp } from "./user";
export const gitProviderType = pgEnum("gitProviderType", [
"github",
@@ -31,7 +32,7 @@ export const gitProvider = pgTable("git_provider", {
.references(() => organization.id, { onDelete: "cascade" }),
userId: text("userId")
.notNull()
- .references(() => account.userId, { onDelete: "cascade" }),
+ .references(() => users_temp.id, { onDelete: "cascade" }),
});
export const gitProviderRelations = relations(gitProvider, ({ one }) => ({
@@ -55,9 +56,9 @@ export const gitProviderRelations = relations(gitProvider, ({ one }) => ({
fields: [gitProvider.organizationId],
references: [organization.id],
}),
- account: one(account, {
+ user: one(users_temp, {
fields: [gitProvider.userId],
- references: [account.userId],
+ references: [users_temp.id],
}),
}));
From d97461d82042a01119095c37f968171733544703 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 21:03:31 -0600
Subject: [PATCH 45/54] refactor(git-provider): update UnauthorizedGitProvider
to use service prop and enhance access handling
- Changed the prop name from 'application' to 'service' in the UnauthorizedGitProvider component for clarity.
- Updated the logic to check for unauthorized access to the git provider in the compose router, returning a new field 'hasGitProviderAccess'.
- Implemented a disconnect functionality for git providers in the ShowProviderFormCompose component, providing user feedback on success or failure.
---
.../application/general/generic/show.tsx | 2 +-
.../generic/unauthorized-git-provider.tsx | 50 +++++-----
.../compose/general/generic/show.tsx | 52 +++++++++-
apps/dokploy/server/api/routers/compose.ts | 96 ++++++++++++++++++-
4 files changed, 173 insertions(+), 27 deletions(-)
diff --git a/apps/dokploy/components/dashboard/application/general/generic/show.tsx b/apps/dokploy/components/dashboard/application/general/generic/show.tsx
index ab02f848..13d3a6d8 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/show.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/show.tsx
@@ -122,7 +122,7 @@ export const ShowProviderForm = ({ applicationId }: Props) => {
diff --git a/apps/dokploy/components/dashboard/application/general/generic/unauthorized-git-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/unauthorized-git-provider.tsx
index cad939b0..4dbdf7a6 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/unauthorized-git-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/unauthorized-git-provider.tsx
@@ -9,15 +9,17 @@ import { DialogAction } from "@/components/shared/dialog-action";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import type { RouterOutputs } from "@/utils/api";
import { AlertCircle, GitBranch, Unlink } from "lucide-react";
-export const UnauthorizedGitProvider = ({
- application,
- onDisconnect,
-}: {
- application: any;
+interface Props {
+ service:
+ | RouterOutputs["application"]["one"]
+ | RouterOutputs["compose"]["one"];
onDisconnect: () => void;
-}) => {
+}
+
+export const UnauthorizedGitProvider = ({ service, onDisconnect }: Props) => {
const getProviderIcon = (sourceType: string) => {
switch (sourceType) {
case "github":
@@ -36,35 +38,35 @@ export const UnauthorizedGitProvider = ({
};
const getRepositoryInfo = () => {
- switch (application.sourceType) {
+ switch (service.sourceType) {
case "github":
return {
- repo: application.repository,
- branch: application.branch,
- owner: application.owner,
+ repo: service.repository,
+ branch: service.branch,
+ owner: service.owner,
};
case "gitlab":
return {
- repo: application.gitlabRepository,
- branch: application.gitlabBranch,
- owner: application.gitlabOwner,
+ repo: service.gitlabRepository,
+ branch: service.gitlabBranch,
+ owner: service.gitlabOwner,
};
case "bitbucket":
return {
- repo: application.bitbucketRepository,
- branch: application.bitbucketBranch,
- owner: application.bitbucketOwner,
+ repo: service.bitbucketRepository,
+ branch: service.bitbucketBranch,
+ owner: service.bitbucketOwner,
};
case "gitea":
return {
- repo: application.giteaRepository,
- branch: application.giteaBranch,
- owner: application.giteaOwner,
+ repo: service.giteaRepository,
+ branch: service.giteaBranch,
+ owner: service.giteaOwner,
};
case "git":
return {
- repo: application.customGitUrl,
- branch: application.customGitBranch,
+ repo: service.customGitUrl,
+ branch: service.customGitBranch,
owner: null,
};
default:
@@ -79,7 +81,7 @@ export const UnauthorizedGitProvider = ({
- This application is connected to a {application.sourceType} repository
+ This application is connected to a {service.sourceType} repository
through a git provider that you don't have access to. You can see
basic repository information below, but cannot modify the
configuration.
@@ -89,9 +91,9 @@ export const UnauthorizedGitProvider = ({
- {getProviderIcon(application.sourceType)}
+ {getProviderIcon(service.sourceType)}
- {application.sourceType} Repository
+ {service.sourceType} Repository
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
index afdfbfba..cd510ad6 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
@@ -18,6 +18,8 @@ import { SaveGitProviderCompose } from "./save-git-provider-compose";
import { SaveGiteaProviderCompose } from "./save-gitea-provider-compose";
import { SaveGithubProviderCompose } from "./save-github-provider-compose";
import { SaveGitlabProviderCompose } from "./save-gitlab-provider-compose";
+import { UnauthorizedGitProvider } from "@/components/dashboard/application/general/generic/unauthorized-git-provider";
+import { toast } from "sonner";
type TabState = "github" | "git" | "raw" | "gitlab" | "bitbucket" | "gitea";
interface Props {
@@ -34,12 +36,29 @@ export const ShowProviderFormCompose = ({ composeId }: Props) => {
const { data: giteaProviders, isLoading: isLoadingGitea } =
api.gitea.giteaProviders.useQuery();
- const { data: compose } = api.compose.one.useQuery({ composeId });
+ const { mutateAsync: disconnectGitProvider } =
+ api.compose.disconnectGitProvider.useMutation();
+
+ const { data: compose, refetch } = api.compose.one.useQuery({ composeId });
const [tab, setSab] = useState(compose?.sourceType || "github");
const isLoading =
isLoadingGithub || isLoadingGitlab || isLoadingBitbucket || isLoadingGitea;
+ const handleDisconnect = async () => {
+ try {
+ await disconnectGitProvider({ composeId });
+ toast.success("Repository disconnected successfully");
+ await refetch();
+ } catch (error) {
+ toast.error(
+ `Failed to disconnect repository: ${
+ error instanceof Error ? error.message : "Unknown error"
+ }`,
+ );
+ }
+ };
+
if (isLoading) {
return (
@@ -68,6 +87,37 @@ export const ShowProviderFormCompose = ({ composeId }: Props) => {
);
}
+ // Check if user doesn't have access to the current git provider
+ if (
+ compose &&
+ !compose.hasGitProviderAccess &&
+ compose.sourceType !== "raw"
+ ) {
+ return (
+
+
+
+
+
Provider
+
+ Repository connection through unauthorized provider
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+
return (
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index 7d5397d7..1b9ebd6a 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -28,6 +28,7 @@ import {
deleteMount,
findComposeById,
findDomainsByComposeId,
+ findGitProviderById,
findProjectById,
findServerById,
findUserById,
@@ -119,7 +120,45 @@ export const composeRouter = createTRPCRouter({
message: "You are not authorized to access this compose",
});
}
- return compose;
+
+ let hasGitProviderAccess = true;
+ let unauthorizedProvider: string | null = null;
+
+ const getGitProviderId = () => {
+ switch (compose.sourceType) {
+ case "github":
+ return compose.github?.gitProviderId;
+ case "gitlab":
+ return compose.gitlab?.gitProviderId;
+ case "bitbucket":
+ return compose.bitbucket?.gitProviderId;
+ case "gitea":
+ return compose.gitea?.gitProviderId;
+ default:
+ return null;
+ }
+ };
+
+ const gitProviderId = getGitProviderId();
+
+ if (gitProviderId) {
+ try {
+ const gitProvider = await findGitProviderById(gitProviderId);
+ if (gitProvider.userId !== ctx.session.userId) {
+ hasGitProviderAccess = false;
+ unauthorizedProvider = compose.sourceType;
+ }
+ } catch {
+ hasGitProviderAccess = false;
+ unauthorizedProvider = compose.sourceType;
+ }
+ }
+
+ return {
+ ...compose,
+ hasGitProviderAccess,
+ unauthorizedProvider,
+ };
}),
update: protectedProcedure
@@ -526,6 +565,61 @@ export const composeRouter = createTRPCRouter({
const uniqueTags = _.uniq(allTags);
return uniqueTags;
}),
+ disconnectGitProvider: protectedProcedure
+ .input(apiFindCompose)
+ .mutation(async ({ input, ctx }) => {
+ const compose = await findComposeById(input.composeId);
+ if (compose.project.organizationId !== ctx.session.activeOrganizationId) {
+ throw new TRPCError({
+ code: "UNAUTHORIZED",
+ message: "You are not authorized to disconnect this git provider",
+ });
+ }
+
+ // Reset all git provider related fields
+ await updateCompose(input.composeId, {
+ // GitHub fields
+ repository: null,
+ branch: null,
+ owner: null,
+ composePath: undefined,
+ githubId: null,
+ triggerType: "push",
+
+ // GitLab fields
+ gitlabRepository: null,
+ gitlabOwner: null,
+ gitlabBranch: null,
+ gitlabId: null,
+ gitlabProjectId: null,
+ gitlabPathNamespace: null,
+
+ // Bitbucket fields
+ bitbucketRepository: null,
+ bitbucketOwner: null,
+ bitbucketBranch: null,
+ bitbucketId: null,
+
+ // Gitea fields
+ giteaRepository: null,
+ giteaOwner: null,
+ giteaBranch: null,
+ giteaId: null,
+
+ // Custom Git fields
+ customGitBranch: null,
+ customGitUrl: null,
+ customGitSSHKeyId: null,
+
+ // Common fields
+ sourceType: "github", // Reset to default
+ composeStatus: "idle",
+ watchPaths: null,
+ enableSubmodules: false,
+ });
+
+ return true;
+ }),
move: protectedProcedure
.input(
From cad17e0f7f66b531302449cc2271113f1e31c912 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 21:08:49 -0600
Subject: [PATCH 46/54] fix(certificates): improve ASN.1 time parsing and
handle edge cases
- Added TypeScript ignore directive to suppress type checking in the utility file.
- Refactored the time parsing logic to use Number.parseInt for better clarity.
- Adjusted the flow to throw an error for invalid ASN.1 time formats, ensuring robustness in certificate expiration date extraction.
---
.../dashboard/settings/certificates/utils.ts | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/apps/dokploy/components/dashboard/settings/certificates/utils.ts b/apps/dokploy/components/dashboard/settings/certificates/utils.ts
index 716087db..e2aa59ef 100644
--- a/apps/dokploy/components/dashboard/settings/certificates/utils.ts
+++ b/apps/dokploy/components/dashboard/settings/certificates/utils.ts
@@ -1,3 +1,5 @@
+// @ts-nocheck
+
export const extractExpirationDate = (certData: string): Date | null => {
try {
// Decode PEM base64 to DER binary
@@ -12,11 +14,13 @@ export const extractExpirationDate = (certData: string): Date | null => {
// Helper: read ASN.1 length field
function readLength(pos: number): { length: number; offset: number } {
+ // biome-ignore lint/style/noParameterAssign:
let len = der[pos++];
if (len & 0x80) {
const bytes = len & 0x7f;
len = 0;
for (let i = 0; i < bytes; i++) {
+ // biome-ignore lint/style/noParameterAssign:
len = (len << 8) + der[pos++];
}
}
@@ -68,19 +72,19 @@ export const extractExpirationDate = (certData: string): Date | null => {
function parseTime(str: string): Date {
if (str.length === 13) {
// UTCTime YYMMDDhhmmssZ
- const year = parseInt(str.slice(0, 2), 10);
+ const year = Number.parseInt(str.slice(0, 2), 10);
const fullYear = year < 50 ? 2000 + year : 1900 + year;
return new Date(
`${fullYear}-${str.slice(2, 4)}-${str.slice(4, 6)}T${str.slice(6, 8)}:${str.slice(8, 10)}:${str.slice(10, 12)}Z`,
);
- } else if (str.length === 15) {
+ }
+ if (str.length === 15) {
// GeneralizedTime YYYYMMDDhhmmssZ
return new Date(
`${str.slice(0, 4)}-${str.slice(4, 6)}-${str.slice(6, 8)}T${str.slice(8, 10)}:${str.slice(10, 12)}:${str.slice(12, 14)}Z`,
);
- } else {
- throw new Error("Invalid ASN.1 time format");
}
+ throw new Error("Invalid ASN.1 time format");
}
return parseTime(notAfterStr);
From 7c9767d90f09101bfa4ad346aabfaa92d3fddbfd Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 21:17:54 -0600
Subject: [PATCH 47/54] chore: remove rollback-related SQL files and snapshots
- Deleted SQL files for the "rollback" table and related schema changes, including the "funny_leper_queen", "true_marvel_zombies", and "sweet_venom" migrations.
- Removed corresponding snapshot files to clean up the database schema history.
---
.../drizzle/0093_funny_leper_queen.sql | 14 -
.../drizzle/0094_true_marvel_zombies.sql | 2 -
apps/dokploy/drizzle/0095_sweet_venom.sql | 1 -
apps/dokploy/drizzle/meta/0093_snapshot.json | 5813 -----------------
apps/dokploy/drizzle/meta/0094_snapshot.json | 5813 -----------------
apps/dokploy/drizzle/meta/0095_snapshot.json | 5806 ----------------
apps/dokploy/drizzle/meta/_journal.json | 21 -
7 files changed, 17470 deletions(-)
delete mode 100644 apps/dokploy/drizzle/0093_funny_leper_queen.sql
delete mode 100644 apps/dokploy/drizzle/0094_true_marvel_zombies.sql
delete mode 100644 apps/dokploy/drizzle/0095_sweet_venom.sql
delete mode 100644 apps/dokploy/drizzle/meta/0093_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0094_snapshot.json
delete mode 100644 apps/dokploy/drizzle/meta/0095_snapshot.json
diff --git a/apps/dokploy/drizzle/0093_funny_leper_queen.sql b/apps/dokploy/drizzle/0093_funny_leper_queen.sql
deleted file mode 100644
index 38b0bb5f..00000000
--- a/apps/dokploy/drizzle/0093_funny_leper_queen.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-CREATE TABLE "rollback" (
- "rollbackId" text PRIMARY KEY NOT NULL,
- "env" text,
- "deploymentId" text NOT NULL,
- "version" serial NOT NULL,
- "image" text,
- "createdAt" text NOT NULL
-);
---> statement-breakpoint
-ALTER TABLE "application" ADD COLUMN "rollbackActive" boolean DEFAULT false;--> statement-breakpoint
-ALTER TABLE "application" ADD COLUMN "limitRollback" integer DEFAULT 5;--> statement-breakpoint
-ALTER TABLE "deployment" ADD COLUMN "rollbackId" text;--> statement-breakpoint
-ALTER TABLE "rollback" ADD CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk" FOREIGN KEY ("deploymentId") REFERENCES "public"."deployment"("deploymentId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
-ALTER TABLE "deployment" ADD CONSTRAINT "deployment_rollbackId_rollback_rollbackId_fk" FOREIGN KEY ("rollbackId") REFERENCES "public"."rollback"("rollbackId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0094_true_marvel_zombies.sql b/apps/dokploy/drizzle/0094_true_marvel_zombies.sql
deleted file mode 100644
index e4a64a6c..00000000
--- a/apps/dokploy/drizzle/0094_true_marvel_zombies.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE "rollback" ADD COLUMN "fullContext" jsonb;--> statement-breakpoint
-ALTER TABLE "rollback" DROP COLUMN "env";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0095_sweet_venom.sql b/apps/dokploy/drizzle/0095_sweet_venom.sql
deleted file mode 100644
index 95437a79..00000000
--- a/apps/dokploy/drizzle/0095_sweet_venom.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE "application" DROP COLUMN "limitRollback";
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0093_snapshot.json b/apps/dokploy/drizzle/meta/0093_snapshot.json
deleted file mode 100644
index aeb870b5..00000000
--- a/apps/dokploy/drizzle/meta/0093_snapshot.json
+++ /dev/null
@@ -1,5813 +0,0 @@
-{
- "id": "7a6a6383-d13c-421b-b186-d49ced92153a",
- "prevId": "76eb8fe3-21c0-4544-962c-1ae18e8e6730",
- "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
- },
- "limitRollback": {
- "name": "limitRollback",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 5
- },
- "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
- },
- "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
- },
- "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
- }
- },
- "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
- },
- "public.rollback": {
- "name": "rollback",
- "schema": "",
- "columns": {
- "rollbackId": {
- "name": "rollbackId",
- "type": "text",
- "primaryKey": true,
- "notNull": true
- },
- "env": {
- "name": "env",
- "type": "text",
- "primaryKey": false,
- "notNull": false
- },
- "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
- }
- },
- "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/0094_snapshot.json b/apps/dokploy/drizzle/meta/0094_snapshot.json
deleted file mode 100644
index 6245e137..00000000
--- a/apps/dokploy/drizzle/meta/0094_snapshot.json
+++ /dev/null
@@ -1,5813 +0,0 @@
-{
- "id": "094e5fa3-1c41-469b-93af-5a735cfe87a2",
- "prevId": "7a6a6383-d13c-421b-b186-d49ced92153a",
- "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
- },
- "limitRollback": {
- "name": "limitRollback",
- "type": "integer",
- "primaryKey": false,
- "notNull": false,
- "default": 5
- },
- "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
- },
- "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
- },
- "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
- }
- },
- "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
- },
- "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/0095_snapshot.json b/apps/dokploy/drizzle/meta/0095_snapshot.json
deleted file mode 100644
index 114d056f..00000000
--- a/apps/dokploy/drizzle/meta/0095_snapshot.json
+++ /dev/null
@@ -1,5806 +0,0 @@
-{
- "id": "3bd19402-3546-411a-8224-36f8beed2d44",
- "prevId": "094e5fa3-1c41-469b-93af-5a735cfe87a2",
- "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
- },
- "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
- },
- "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
- }
- },
- "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
- },
- "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 5d98f520..1d04d3c6 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -652,27 +652,6 @@
"when": 1747713229160,
"tag": "0092_stiff_the_watchers",
"breakpoints": true
- },
- {
- "idx": 93,
- "version": "7",
- "when": 1748835784658,
- "tag": "0093_funny_leper_queen",
- "breakpoints": true
- },
- {
- "idx": 94,
- "version": "7",
- "when": 1748918922255,
- "tag": "0094_true_marvel_zombies",
- "breakpoints": true
- },
- {
- "idx": 95,
- "version": "7",
- "when": 1748931222940,
- "tag": "0095_sweet_venom",
- "breakpoints": true
}
]
}
\ No newline at end of file
From 98199e65bf5f5dc12b1f8a61d41d6f0563e82fdc Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 21:21:29 -0600
Subject: [PATCH 48/54] refactor: remove limitRollback property and add
rollback table schema
- Removed the limitRollback property from the baseApp configuration in drop.test.test.ts and traefik.test.ts files.
- Introduced a new SQL file to create a rollback table with relevant fields and constraints.
- Updated the journal and snapshot files to reflect the new rollback schema changes.
---
apps/dokploy/__test__/drop/drop.test.test.ts | 1 -
apps/dokploy/__test__/traefik/traefik.test.ts | 1 -
apps/dokploy/drizzle/0095_curly_justice.sql | 13 +
apps/dokploy/drizzle/meta/0095_snapshot.json | 5826 +++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 7 +
5 files changed, 5846 insertions(+), 2 deletions(-)
create mode 100644 apps/dokploy/drizzle/0095_curly_justice.sql
create mode 100644 apps/dokploy/drizzle/meta/0095_snapshot.json
diff --git a/apps/dokploy/__test__/drop/drop.test.test.ts b/apps/dokploy/__test__/drop/drop.test.test.ts
index 87fb6eae..9fa68b6b 100644
--- a/apps/dokploy/__test__/drop/drop.test.test.ts
+++ b/apps/dokploy/__test__/drop/drop.test.test.ts
@@ -121,7 +121,6 @@ const baseApp: ApplicationNested = {
updateConfigSwarm: null,
username: null,
dockerContextPath: null,
- limitRollback: 5,
rollbackActive: false,
};
diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts
index 47f96acd..5cd033af 100644
--- a/apps/dokploy/__test__/traefik/traefik.test.ts
+++ b/apps/dokploy/__test__/traefik/traefik.test.ts
@@ -6,7 +6,6 @@ import { expect, test } from "vitest";
const baseApp: ApplicationNested = {
rollbackActive: false,
- limitRollback: 5,
applicationId: "",
herokuVersion: "",
giteaRepository: "",
diff --git a/apps/dokploy/drizzle/0095_curly_justice.sql b/apps/dokploy/drizzle/0095_curly_justice.sql
new file mode 100644
index 00000000..f2203ad2
--- /dev/null
+++ b/apps/dokploy/drizzle/0095_curly_justice.sql
@@ -0,0 +1,13 @@
+CREATE TABLE "rollback" (
+ "rollbackId" text PRIMARY KEY NOT NULL,
+ "deploymentId" text NOT NULL,
+ "version" serial NOT NULL,
+ "image" text,
+ "createdAt" text NOT NULL,
+ "fullContext" jsonb
+);
+--> statement-breakpoint
+ALTER TABLE "application" ADD COLUMN "rollbackActive" boolean DEFAULT false;--> statement-breakpoint
+ALTER TABLE "deployment" ADD COLUMN "rollbackId" text;--> statement-breakpoint
+ALTER TABLE "rollback" ADD CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk" FOREIGN KEY ("deploymentId") REFERENCES "public"."deployment"("deploymentId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "deployment" ADD CONSTRAINT "deployment_rollbackId_rollback_rollbackId_fk" FOREIGN KEY ("rollbackId") REFERENCES "public"."rollback"("rollbackId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0095_snapshot.json b/apps/dokploy/drizzle/meta/0095_snapshot.json
new file mode 100644
index 00000000..964dce63
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0095_snapshot.json
@@ -0,0 +1,5826 @@
+{
+ "id": "17e7fed2-ce4e-4d2e-912e-1316f1c10fd4",
+ "prevId": "ab6d4705-f0da-4949-b0dc-403abece1a3e",
+ "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
+ },
+ "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 391799bb..c7a37aba 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -666,6 +666,13 @@
"when": 1750559214977,
"tag": "0094_numerous_carmella_unuscione",
"breakpoints": true
+ },
+ {
+ "idx": 95,
+ "version": "7",
+ "when": 1750562292392,
+ "tag": "0095_curly_justice",
+ "breakpoints": true
}
]
}
\ No newline at end of file
From 8c5e34c528cd7ef11462d260ab9d8b1dd610a814 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 21:53:14 -0600
Subject: [PATCH 49/54] refactor: remove limitRollback property from rollback
settings schema
- Eliminated the limitRollback property from the form schema in show-rollback-settings.tsx to simplify the rollback configuration.
---
.../dashboard/application/rollbacks/show-rollback-settings.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/apps/dokploy/components/dashboard/application/rollbacks/show-rollback-settings.tsx b/apps/dokploy/components/dashboard/application/rollbacks/show-rollback-settings.tsx
index 27f52534..4b2edca0 100644
--- a/apps/dokploy/components/dashboard/application/rollbacks/show-rollback-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/rollbacks/show-rollback-settings.tsx
@@ -25,7 +25,6 @@ import { z } from "zod";
const formSchema = z.object({
rollbackActive: z.boolean(),
- limitRollback: z.number().min(1).max(50),
});
type FormValues = z.infer;
From 3d285ca437e920cf2915cffe20571a1190a58014 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:17:21 -0600
Subject: [PATCH 50/54] feat(rollback): add rollback constraints and snapshots
- Introduced two new SQL files for rollback constraints, updating foreign key relationships with different delete actions (set null and cascade).
- Updated the journal and snapshot files to include the new rollback schema changes for versions 0096 and 0097.
- Enhanced the application service to handle rollback image tagging based on source type.
- Implemented rollback removal logic in the deployment service to ensure proper cleanup of rollback entries.
---
apps/dokploy/drizzle/0096_small_shaman.sql | 3 +
apps/dokploy/drizzle/0097_hard_lizard.sql | 3 +
apps/dokploy/drizzle/meta/0096_snapshot.json | 5826 ++++++++++++++++++
apps/dokploy/drizzle/meta/0097_snapshot.json | 5826 ++++++++++++++++++
apps/dokploy/drizzle/meta/_journal.json | 14 +
packages/server/src/services/application.ts | 6 +-
packages/server/src/services/deployment.ts | 12 +-
packages/server/src/services/rollbacks.ts | 59 +-
8 files changed, 11732 insertions(+), 17 deletions(-)
create mode 100644 apps/dokploy/drizzle/0096_small_shaman.sql
create mode 100644 apps/dokploy/drizzle/0097_hard_lizard.sql
create mode 100644 apps/dokploy/drizzle/meta/0096_snapshot.json
create mode 100644 apps/dokploy/drizzle/meta/0097_snapshot.json
diff --git a/apps/dokploy/drizzle/0096_small_shaman.sql b/apps/dokploy/drizzle/0096_small_shaman.sql
new file mode 100644
index 00000000..a80d5014
--- /dev/null
+++ b/apps/dokploy/drizzle/0096_small_shaman.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "rollback" DROP CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk";
+--> statement-breakpoint
+ALTER TABLE "rollback" ADD CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk" FOREIGN KEY ("deploymentId") REFERENCES "public"."deployment"("deploymentId") ON DELETE set null ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/0097_hard_lizard.sql b/apps/dokploy/drizzle/0097_hard_lizard.sql
new file mode 100644
index 00000000..8cd5e0bf
--- /dev/null
+++ b/apps/dokploy/drizzle/0097_hard_lizard.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "rollback" DROP CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk";
+--> statement-breakpoint
+ALTER TABLE "rollback" ADD CONSTRAINT "rollback_deploymentId_deployment_deploymentId_fk" FOREIGN KEY ("deploymentId") REFERENCES "public"."deployment"("deploymentId") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/apps/dokploy/drizzle/meta/0096_snapshot.json b/apps/dokploy/drizzle/meta/0096_snapshot.json
new file mode 100644
index 00000000..43584d66
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0096_snapshot.json
@@ -0,0 +1,5826 @@
+{
+ "id": "fd93026f-b2f1-4ba7-886d-a24793305fb5",
+ "prevId": "17e7fed2-ce4e-4d2e-912e-1316f1c10fd4",
+ "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
+ },
+ "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": "set null",
+ "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/0097_snapshot.json b/apps/dokploy/drizzle/meta/0097_snapshot.json
new file mode 100644
index 00000000..3dafc78d
--- /dev/null
+++ b/apps/dokploy/drizzle/meta/0097_snapshot.json
@@ -0,0 +1,5826 @@
+{
+ "id": "fdc95bd1-866c-4efd-9dce-20ed08f5b0b5",
+ "prevId": "fd93026f-b2f1-4ba7-886d-a24793305fb5",
+ "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
+ },
+ "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 c7a37aba..e703e059 100644
--- a/apps/dokploy/drizzle/meta/_journal.json
+++ b/apps/dokploy/drizzle/meta/_journal.json
@@ -673,6 +673,20 @@
"when": 1750562292392,
"tag": "0095_curly_justice",
"breakpoints": true
+ },
+ {
+ "idx": 96,
+ "version": "7",
+ "when": 1750566830268,
+ "tag": "0096_small_shaman",
+ "breakpoints": true
+ },
+ {
+ "idx": 97,
+ "version": "7",
+ "when": 1750567641441,
+ "tag": "0097_hard_lizard",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index 480b8cc2..7c26e46b 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -216,8 +216,12 @@ export const deployApplication = async ({
await updateApplicationStatus(applicationId, "done");
if (application.rollbackActive) {
+ const tagImage =
+ application.sourceType === "docker"
+ ? application.dockerImage
+ : application.appName;
await createRollback({
- appName: application.appName,
+ appName: tagImage || "",
deploymentId: deployment.deploymentId,
});
}
diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts
index d74a1e26..fe9a1318 100644
--- a/packages/server/src/services/deployment.ts
+++ b/packages/server/src/services/deployment.ts
@@ -31,6 +31,7 @@ import {
updatePreviewDeployment,
} from "./preview-deployment";
import { findScheduleById } from "./schedule";
+import { removeRollbackById } from "./rollbacks";
export type Deployment = typeof deployments.$inferSelect;
@@ -495,6 +496,9 @@ const getDeploymentsByType = async (
const deploymentList = await db.query.deployments.findMany({
where: eq(deployments[`${type}Id`], id),
orderBy: desc(deployments.createdAt),
+ with: {
+ rollback: true,
+ },
});
return deploymentList;
};
@@ -529,6 +533,9 @@ const removeLastTenDeployments = async (
let command = "";
for (const oldDeployment of deploymentsToDelete) {
const logPath = path.join(oldDeployment.logPath);
+ if (oldDeployment.rollbackId) {
+ await removeRollbackById(oldDeployment.rollbackId);
+ }
command += `
rm -rf ${logPath};
@@ -539,8 +546,11 @@ const removeLastTenDeployments = async (
await execAsyncRemote(serverId, command);
} else {
for (const oldDeployment of deploymentsToDelete) {
+ if (oldDeployment.rollbackId) {
+ await removeRollbackById(oldDeployment.rollbackId);
+ }
const logPath = path.join(oldDeployment.logPath);
- if (existsSync(logPath)) {
+ if (existsSync(logPath) && !oldDeployment.errorMessage) {
await fsPromises.unlink(logPath);
}
await removeDeployment(oldDeployment.deploymentId);
diff --git a/packages/server/src/services/rollbacks.ts b/packages/server/src/services/rollbacks.ts
index bf145b86..58df6591 100644
--- a/packages/server/src/services/rollbacks.ts
+++ b/packages/server/src/services/rollbacks.ts
@@ -1,6 +1,10 @@
import { eq } from "drizzle-orm";
import { db } from "../db";
-import { type createRollbackSchema, rollbacks } from "../db/schema";
+import {
+ type createRollbackSchema,
+ rollbacks,
+ deployments as deploymentsSchema,
+} from "../db/schema";
import type { z } from "zod";
import { findApplicationById } from "./application";
import { getRemoteDocker } from "../utils/servers/remote-docker";
@@ -30,8 +34,14 @@ export const createRollback = async (
throw new Error("Deployment not found");
}
- const { deployments, bitbucket, github, gitlab, gitea, ...rest } =
- await findApplicationById(deployment.applicationId);
+ const {
+ deployments: _,
+ bitbucket,
+ github,
+ gitlab,
+ gitea,
+ ...rest
+ } = await findApplicationById(deployment.applicationId);
await tx
.update(rollbacks)
@@ -41,6 +51,14 @@ export const createRollback = async (
})
.where(eq(rollbacks.rollbackId, rollback.rollbackId));
+ // Update the deployment to reference this rollback
+ await tx
+ .update(deploymentsSchema)
+ .set({
+ rollbackId: rollback.rollbackId,
+ })
+ .where(eq(deploymentsSchema.deploymentId, rollback.deploymentId));
+
await createRollbackImage(rest, tagImage);
return rollback;
@@ -65,12 +83,17 @@ const createRollbackImage = async (
) => {
const docker = await getRemoteDocker(application.serverId);
- const result = docker.getImage(`${application.appName}:latest`);
+ const appTagName =
+ application.sourceType === "docker"
+ ? application.dockerImage
+ : `${application.appName}:latest`;
- const version = tagImage.split(":")[1];
+ const result = docker.getImage(appTagName || "");
+
+ const [repo, version] = tagImage.split(":");
await result.tag({
- repo: tagImage,
+ repo,
tag: version,
});
};
@@ -86,28 +109,34 @@ const deleteRollbackImage = async (image: string, serverId?: string | null) => {
};
export const removeRollbackById = async (rollbackId: string) => {
- const result = await db
- .delete(rollbacks)
- .where(eq(rollbacks.rollbackId, rollbackId))
- .returning()
- .then((res) => res[0]);
+ const rollback = await findRollbackById(rollbackId);
- if (result?.image) {
+ if (!rollback) {
+ throw new Error("Rollback not found");
+ }
+
+ if (rollback?.image) {
try {
- const deployment = await findDeploymentById(result.deploymentId);
+ const deployment = await findDeploymentById(rollback.deploymentId);
if (!deployment?.applicationId) {
throw new Error("Deployment not found");
}
const application = await findApplicationById(deployment.applicationId);
- await deleteRollbackImage(result.image, application.serverId);
+ await deleteRollbackImage(rollback.image, application.serverId);
+
+ await db
+ .delete(rollbacks)
+ .where(eq(rollbacks.rollbackId, rollbackId))
+ .returning()
+ .then((res) => res[0]);
} catch (error) {
console.error(error);
}
}
- return result;
+ return rollback;
};
export const rollback = async (rollbackId: string) => {
From 89d573a2f5d399074c84be184e9443eec14d166b Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:18:06 -0600
Subject: [PATCH 51/54] refactor: remove ShowEnv component from rollbacks
- Deleted the ShowEnv component responsible for displaying environment variables in the rollback context, streamlining the codebase.
---
.../application/rollbacks/show-env.tsx | 46 -------------------
1 file changed, 46 deletions(-)
delete mode 100644 apps/dokploy/components/dashboard/application/rollbacks/show-env.tsx
diff --git a/apps/dokploy/components/dashboard/application/rollbacks/show-env.tsx b/apps/dokploy/components/dashboard/application/rollbacks/show-env.tsx
deleted file mode 100644
index 0365449f..00000000
--- a/apps/dokploy/components/dashboard/application/rollbacks/show-env.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogHeader,
- DialogTitle,
- DialogTrigger,
-} from "@/components/ui/dialog";
-import { Button } from "@/components/ui/button";
-import { Eye } from "lucide-react";
-import { CodeEditor } from "@/components/shared/code-editor";
-
-interface Props {
- env: string | null;
-}
-
-export const ShowEnv = ({ env }: Props) => {
- if (!env) return null;
-
- return (
-
-
-
-
- View Env
-
-
-
-
- Environment Variables
-
- Environment variables for this rollback version
-
-
-
-
-
-
-
-
- );
-};
From bd82199ae0c28a4a09f9fe319412d61e52e7cfdc Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:24:53 -0600
Subject: [PATCH 52/54] feat(rollback): implement rollback creation in
deployment process
- Added logic to create a rollback entry if the application has an active rollback during the deployment process.
- Enhanced the rollback handling by determining the appropriate tag image based on the application's source type (docker or app name).
---
packages/server/src/services/application.ts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index 7c26e46b..179820b8 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -350,6 +350,17 @@ export const deployRemoteApplication = async ({
await updateDeploymentStatus(deployment.deploymentId, "done");
await updateApplicationStatus(applicationId, "done");
+ if (application.rollbackActive) {
+ const tagImage =
+ application.sourceType === "docker"
+ ? application.dockerImage
+ : application.appName;
+ await createRollback({
+ appName: tagImage || "",
+ deploymentId: deployment.deploymentId,
+ });
+ }
+
await sendBuildSuccessNotifications({
projectName: application.project.name,
applicationName: application.name,
From 316f592e09e76c19a164dd5f8b28b110bfb4b7eb Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:35:11 -0600
Subject: [PATCH 53/54] refactor(rollback): clean up unused code in rollback
router
- Removed commented-out code and unused imports from the rollback router file to streamline the codebase and improve readability.
---
apps/dokploy/server/api/routers/rollbacks.ts | 23 --------------------
1 file changed, 23 deletions(-)
diff --git a/apps/dokploy/server/api/routers/rollbacks.ts b/apps/dokploy/server/api/routers/rollbacks.ts
index 6fb1f741..c6a82b3d 100644
--- a/apps/dokploy/server/api/routers/rollbacks.ts
+++ b/apps/dokploy/server/api/routers/rollbacks.ts
@@ -2,9 +2,6 @@ import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
import { apiFindOneRollback } from "@/server/db/schema";
import { removeRollbackById, rollback } from "@dokploy/server";
import { TRPCError } from "@trpc/server";
-// import { eq, desc } from "drizzle-orm";
-// import { db } from "@/server/db";
-// import { z } from "zod";
export const rollbackRouter = createTRPCRouter({
delete: protectedProcedure
@@ -23,26 +20,6 @@ export const rollbackRouter = createTRPCRouter({
});
}
}),
- // all: protectedProcedure
- // .input(
- // z.object({
- // applicationId: z.string(),
- // }),
- // )
- // .query(async ({ input }) => {
- // try {
- // return await db.query.rollbacks.findMany({
- // where: eq(rollbacks.applicationId, input.applicationId),
- // orderBy: desc(rollbacks.createdAt),
- // });
- // } catch (error) {
- // throw new TRPCError({
- // code: "BAD_REQUEST",
- // message: "Error input: Fetching rollbacks",
- // cause: error,
- // });
- // }
- // }),
rollback: protectedProcedure
.input(apiFindOneRollback)
.mutation(async ({ input }) => {
From 45a178e7055c996a369fa82ba3ae29b3fbeda2d3 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Sat, 21 Jun 2025 23:58:27 -0600
Subject: [PATCH 54/54] chore: update version in package.json to v0.23.0
---
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 0b87dde3..dd35e837 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -1,6 +1,6 @@
{
"name": "dokploy",
- "version": "v0.22.7",
+ "version": "v0.23.0",
"private": true,
"license": "Apache-2.0",
"type": "module",