feat: add preview image builder

This commit is contained in:
BennyKok
2024-01-04 22:29:22 +08:00
parent 314eb9fd16
commit 9937252777
18 changed files with 1085 additions and 56 deletions
+9
View File
@@ -108,6 +108,12 @@ export const machinesType = pgEnum("machine_type", [
"modal-serverless",
]);
export const machinesStatus = pgEnum("machine_status", [
"ready",
"building",
"error",
]);
// We still want to keep the workflow run record.
export const workflowRunsTable = dbSchema.table("workflow_runs", {
id: uuid("id").primaryKey().defaultRandom().notNull(),
@@ -193,6 +199,9 @@ export const machinesTable = dbSchema.table("machines", {
disabled: boolean("disabled").default(false).notNull(),
auth_token: text("auth_token"),
type: machinesType("type").notNull().default("classic"),
status: machinesStatus("status").notNull().default("ready"),
snapshot: jsonb("snapshot").$type<any>(),
build_log: text("build_log"),
});
export const insertMachineSchema = createInsertSchema(machinesTable, {