mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-05 03:25:04 +02:00
Add ability for sticky sessions to backend resource.
This commit is contained in:
parent
8b0c30f19f
commit
ac8e315fbd
6 changed files with 99 additions and 9 deletions
23
server/setup/scripts/1.3.0.ts
Normal file
23
server/setup/scripts/1.3.0.ts
Normal 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`);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue