mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-10 14:05:18 +00:00
feat: add patch table and related constraints
- Introduced a new SQL file to create a "patch" table with a custom ENUM type "patchType" for tracking changes. - Added foreign key constraints linking "applicationId" and "composeId" to their respective tables. - Removed the previous SQL file that contained redundant definitions for the "patchType" and its column in the "patch" table.
This commit is contained in:
+2
@@ -1,5 +1,7 @@
|
|||||||
|
CREATE TYPE "public"."patchType" AS ENUM('create', 'update', 'delete');--> statement-breakpoint
|
||||||
CREATE TABLE "patch" (
|
CREATE TABLE "patch" (
|
||||||
"patchId" text PRIMARY KEY NOT NULL,
|
"patchId" text PRIMARY KEY NOT NULL,
|
||||||
|
"type" "patchType" DEFAULT 'update' NOT NULL,
|
||||||
"filePath" text NOT NULL,
|
"filePath" text NOT NULL,
|
||||||
"enabled" boolean DEFAULT true NOT NULL,
|
"enabled" boolean DEFAULT true NOT NULL,
|
||||||
"content" text NOT NULL,
|
"content" text NOT NULL,
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
CREATE TYPE "public"."patchType" AS ENUM('create', 'update', 'delete');--> statement-breakpoint
|
|
||||||
ALTER TABLE "patch" ADD COLUMN "type" "patchType" DEFAULT 'update' NOT NULL;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "5ba7ed04-440d-49a1-a7b6-8d4f4b147fc8",
|
"id": "ec86a5ad-8776-483e-a003-346d32f65089",
|
||||||
"prevId": "50c73964-11f8-41d6-a282-780e38bdddd9",
|
"prevId": "50c73964-11f8-41d6-a282-780e38bdddd9",
|
||||||
"version": "7",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
@@ -4983,6 +4983,14 @@
|
|||||||
"primaryKey": true,
|
"primaryKey": true,
|
||||||
"notNull": true
|
"notNull": true
|
||||||
},
|
},
|
||||||
|
"type": {
|
||||||
|
"name": "type",
|
||||||
|
"type": "patchType",
|
||||||
|
"typeSchema": "public",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "'update'"
|
||||||
|
},
|
||||||
"filePath": {
|
"filePath": {
|
||||||
"name": "filePath",
|
"name": "filePath",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -7343,6 +7351,15 @@
|
|||||||
"teams"
|
"teams"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"public.patchType": {
|
||||||
|
"name": "patchType",
|
||||||
|
"schema": "public",
|
||||||
|
"values": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"delete"
|
||||||
|
]
|
||||||
|
},
|
||||||
"public.protocolType": {
|
"public.protocolType": {
|
||||||
"name": "protocolType",
|
"name": "protocolType",
|
||||||
"schema": "public",
|
"schema": "public",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1020,15 +1020,8 @@
|
|||||||
{
|
{
|
||||||
"idx": 145,
|
"idx": 145,
|
||||||
"version": "7",
|
"version": "7",
|
||||||
"when": 1771307553867,
|
"when": 1771447229358,
|
||||||
"tag": "0145_bitter_vivisector",
|
"tag": "0145_remarkable_titania",
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 146,
|
|
||||||
"version": "7",
|
|
||||||
"when": 1771315685460,
|
|
||||||
"tag": "0146_clammy_titanium_man",
|
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user