Add ability for sticky sessions to backend resource.

This commit is contained in:
Matthew Evans 2025-04-11 03:00:43 -04:00
parent 8b0c30f19f
commit ac8e315fbd
6 changed files with 99 additions and 9 deletions

View file

@ -0,0 +1,23 @@
import db from "@server/db";
import { sql } from "drizzle-orm";
const version = "1.3.0";
export default async function migration() {
console.log(`Running setup script ${version}...`);
try {
db.transaction((trx) => {
trx.run(
sql`ALTER TABLE resources ADD stickySession integer DEFAULT false NOT NULL;`
);
});
console.log(`Added new column: stickySession`);
} catch (e) {
console.log("Unable to add new column: stickySession");
throw e;
}
console.log(`${version} migration complete`);
}