Refactor triggerType implementation: remove old SQL triggerType column definitions and replace with ENUM type in application and compose tables. Update shared schema to include triggerType enum.

This commit is contained in:
Mauricio Siu
2025-04-26 21:14:30 -06:00
parent 120646c77b
commit 91bcd1238f
7 changed files with 5423 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ import { redirects } from "./redirects";
import { registry } from "./registry";
import { security } from "./security";
import { server } from "./server";
import { applicationStatus, certificateType } from "./shared";
import { applicationStatus, certificateType, triggerType } from "./shared";
import { sshKeys } from "./ssh-key";
import { generateAppName } from "./utils";
@@ -149,7 +149,7 @@ export const applications = pgTable("application", {
owner: text("owner"),
branch: text("branch"),
buildPath: text("buildPath").default("/"),
triggerType: text("triggerType").default("push"),
triggerType: triggerType("triggerType").default("push"),
autoDeploy: boolean("autoDeploy").$defaultFn(() => true),
// Gitlab
gitlabProjectId: integer("gitlabProjectId"),