added table change to new migration script

This commit is contained in:
Matthias Palmetshofer 2025-04-10 00:36:34 +02:00
parent 674316aa46
commit 517bc7f632
No known key found for this signature in database
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,23 @@
import db from "@server/db";
import { sql } from "drizzle-orm";
const version = "1.1.0";
export default async function migration() {
console.log(`Running setup script ${version}...`);
try {
db.transaction((trx) => {
trx.run(
sql`ALTER TABLE 'resources' ADD 'tlsServerName' integer DEFAULT '' NOT NULL;`
);
});
console.log(`Migrated database schema`);
} catch (e) {
console.log("Unable to migrate database schema");
throw e;
}
console.log(`${version} migration complete`);
}