Make sure the pamMode is push for host resources

This commit is contained in:
Owen
2026-06-08 21:54:06 -07:00
parent 5a575c916b
commit f28571629f
2 changed files with 12 additions and 0 deletions

View File

@@ -197,6 +197,11 @@ export default async function migration() {
await db.execute(
sql`ALTER TABLE "siteResources" ADD COLUMN "pamMode" varchar(32) DEFAULT 'passthrough';`
);
await db.execute(sql`
UPDATE "siteResources"
SET "pamMode" = 'push'
WHERE LOWER(COALESCE("mode", '')) = 'host';
`);
await db.execute(
sql`ALTER TABLE "sites" ADD COLUMN "autoUpdateEnabled" boolean DEFAULT false NOT NULL;`
);

View File

@@ -247,6 +247,13 @@ export default async function migration() {
ALTER TABLE 'siteResources' ADD COLUMN 'pamMode' text DEFAULT 'passthrough';
`
).run();
db.prepare(
`
UPDATE 'siteResources'
SET "pamMode" = 'push'
WHERE LOWER(COALESCE("mode", '')) = 'host';
`
).run();
db.prepare(
`