mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: migrations
This commit is contained in:
25
drizzle/0026_known_dormammu.sql
Normal file
25
drizzle/0026_known_dormammu.sql
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS "ssh-key" (
|
||||||
|
"sshKeyId" text PRIMARY KEY NOT NULL,
|
||||||
|
"publicKey" text NOT NULL,
|
||||||
|
"name" text NOT NULL,
|
||||||
|
"description" text,
|
||||||
|
"createdAt" text NOT NULL,
|
||||||
|
"lastUsedAt" text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "application" ADD COLUMN "customGitSSHKeyId" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "compose" ADD COLUMN "customGitSSHKeyId" text;--> statement-breakpoint
|
||||||
|
DO $$ BEGIN
|
||||||
|
ALTER TABLE "application" ADD CONSTRAINT "application_customGitSSHKeyId_ssh-key_sshKeyId_fk" FOREIGN KEY ("customGitSSHKeyId") REFERENCES "public"."ssh-key"("sshKeyId") ON DELETE set null ON UPDATE no action;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN duplicate_object THEN null;
|
||||||
|
END $$;
|
||||||
|
--> statement-breakpoint
|
||||||
|
DO $$ BEGIN
|
||||||
|
ALTER TABLE "compose" ADD CONSTRAINT "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk" FOREIGN KEY ("customGitSSHKeyId") REFERENCES "public"."ssh-key"("sshKeyId") ON DELETE set null ON UPDATE no action;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN duplicate_object THEN null;
|
||||||
|
END $$;
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "application" DROP COLUMN IF EXISTS "customGitSSHKey";--> statement-breakpoint
|
||||||
|
ALTER TABLE "compose" DROP COLUMN IF EXISTS "customGitSSHKey";
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS "ssh-key" (
|
|
||||||
"sshKeyId" text PRIMARY KEY NOT NULL,
|
|
||||||
"publicKey" text NOT NULL,
|
|
||||||
"name" text NOT NULL,
|
|
||||||
"description" text,
|
|
||||||
"createdAt" text NOT NULL,
|
|
||||||
"lastUsedAt" text
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "application" RENAME COLUMN "customGitSSHKey" TO "customGitSSHKeyId";--> statement-breakpoint
|
|
||||||
DO $$ BEGIN
|
|
||||||
ALTER TABLE "application" ADD CONSTRAINT "application_customGitSSHKeyId_ssh-key_sshKeyId_fk" FOREIGN KEY ("customGitSSHKeyId") REFERENCES "public"."ssh-key"("sshKeyId") ON DELETE set null ON UPDATE no action;
|
|
||||||
EXCEPTION
|
|
||||||
WHEN duplicate_object THEN null;
|
|
||||||
END $$;
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ALTER TABLE "compose" ADD COLUMN "customGitSSHKeyId" text;--> statement-breakpoint
|
|
||||||
DO $$ BEGIN
|
|
||||||
ALTER TABLE "compose" ADD CONSTRAINT "compose_customGitSSHKeyId_ssh-key_sshKeyId_fk" FOREIGN KEY ("customGitSSHKeyId") REFERENCES "public"."ssh-key"("sshKeyId") ON DELETE set null ON UPDATE no action;
|
|
||||||
EXCEPTION
|
|
||||||
WHEN duplicate_object THEN null;
|
|
||||||
END $$;
|
|
||||||
--> statement-breakpoint
|
|
||||||
ALTER TABLE "compose" DROP COLUMN IF EXISTS "customGitSSHKey";
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "e5196aec-c724-4f9e-bb4e-81dca01905e4",
|
"id": "3dff4fa9-1d03-4748-b3ee-908c34324171",
|
||||||
"prevId": "771c1412-7931-4f79-a789-055b0f51cf0f",
|
"prevId": "771c1412-7931-4f79-a789-055b0f51cf0f",
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
@@ -2392,8 +2392,8 @@
|
|||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false
|
"notNull": false
|
||||||
},
|
},
|
||||||
"customGitSSHKey": {
|
"customGitSSHKeyId": {
|
||||||
"name": "customGitSSHKey",
|
"name": "customGitSSHKeyId",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false
|
"notNull": false
|
||||||
@@ -2435,6 +2435,19 @@
|
|||||||
},
|
},
|
||||||
"indexes": {},
|
"indexes": {},
|
||||||
"foreignKeys": {
|
"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": {
|
"compose_projectId_project_projectId_fk": {
|
||||||
"name": "compose_projectId_project_projectId_fk",
|
"name": "compose_projectId_project_projectId_fk",
|
||||||
"tableFrom": "compose",
|
"tableFrom": "compose",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -187,15 +187,8 @@
|
|||||||
{
|
{
|
||||||
"idx": 26,
|
"idx": 26,
|
||||||
"version": "6",
|
"version": "6",
|
||||||
"when": 1721928706816,
|
"when": 1721979220929,
|
||||||
"tag": "0026_yielding_king_cobra",
|
"tag": "0026_known_dormammu",
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 27,
|
|
||||||
"version": "6",
|
|
||||||
"when": 1721937297064,
|
|
||||||
"tag": "0027_fantastic_squadron_sinister",
|
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user