fix(schema): set default value for mode_type to checkpoint to preview existing db migration issues

This commit is contained in:
bennykok 2024-01-26 10:13:03 +08:00
parent 85477aba9d
commit 93b1fa9c79
4 changed files with 1299 additions and 2 deletions

View File

@ -0,0 +1 @@
ALTER TABLE "comfyui_deploy"."models" ALTER COLUMN "model_type" SET DEFAULT 'checkpoint';

File diff suppressed because it is too large Load Diff

View File

@ -316,6 +316,13 @@
"when": 1706230304140,
"tag": "0044_married_malcolm_colcord",
"breakpoints": true
},
{
"idx": 45,
"version": "5",
"when": 1706235102704,
"tag": "0045_clever_brood",
"breakpoints": true
}
]
}

View File

@ -377,7 +377,7 @@ export const modelUploadType = pgEnum("model_upload_type", [
]);
// https://www.answeroverflow.com/m/1125106227387584552
const modelTypes = [
const modelTypes = [
"checkpoint",
"lora",
"embedding",
@ -418,7 +418,7 @@ export const modelTable = dbSchema.table("models", {
status: resourceUpload("status").notNull().default("started"),
upload_machine_id: text("upload_machine_id"), // TODO: review if actually needed
upload_type: modelUploadType("upload_type").notNull(),
model_type: modelType("model_type").notNull(),
model_type: modelType("model_type").notNull().default("checkpoint"),
error_log: text("error_log"),
created_at: timestamp("created_at").defaultNow().notNull(),
updated_at: timestamp("updated_at").defaultNow().notNull(),