mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-30 07:08:47 +00:00
feat(patch): add patchType enum and update patch schema
- Introduced a new ENUM type "patchType" with values 'create', 'update', and 'delete' to categorize patch operations. - Updated the "patch" table schema to include a new "type" column, defaulting to 'update', ensuring better management of patch types. - Added a new snapshot file for version 7 to reflect the updated database schema.
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE TYPE "public"."patchType" AS ENUM('create', 'update', 'delete');--> statement-breakpoint
|
||||||
|
ALTER TABLE "patch" ADD COLUMN "type" "patchType" DEFAULT 'update' NOT NULL;
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1023,6 +1023,13 @@
|
|||||||
"when": 1771307553867,
|
"when": 1771307553867,
|
||||||
"tag": "0145_bitter_vivisector",
|
"tag": "0145_bitter_vivisector",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 146,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1771315685460,
|
||||||
|
"tag": "0146_clammy_titanium_man",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import { relations } from "drizzle-orm";
|
import { relations } from "drizzle-orm";
|
||||||
import { boolean, pgTable, text, unique } from "drizzle-orm/pg-core";
|
import { boolean, pgEnum, pgTable, text, unique } from "drizzle-orm/pg-core";
|
||||||
import { createInsertSchema } from "drizzle-zod";
|
import { createInsertSchema } from "drizzle-zod";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { applications } from "./application";
|
import { applications } from "./application";
|
||||||
import { compose } from "./compose";
|
import { compose } from "./compose";
|
||||||
|
|
||||||
|
export const patchType = pgEnum("patchType", ["create", "update", "delete"]);
|
||||||
|
|
||||||
export const patch = pgTable(
|
export const patch = pgTable(
|
||||||
"patch",
|
"patch",
|
||||||
{
|
{
|
||||||
@@ -13,6 +15,7 @@ export const patch = pgTable(
|
|||||||
.notNull()
|
.notNull()
|
||||||
.primaryKey()
|
.primaryKey()
|
||||||
.$defaultFn(() => nanoid()),
|
.$defaultFn(() => nanoid()),
|
||||||
|
type: patchType("type").notNull().default("update"),
|
||||||
filePath: text("filePath").notNull(),
|
filePath: text("filePath").notNull(),
|
||||||
enabled: boolean("enabled").notNull().default(true),
|
enabled: boolean("enabled").notNull().default(true),
|
||||||
content: text("content").notNull(),
|
content: text("content").notNull(),
|
||||||
|
|||||||
Reference in New Issue
Block a user