remove migration
Msrc/db/index.ts
@@ -168,21 +168,6 @@ const sqlite = new BunDatabase(DB_PATH);
sqlite.run("PRAGMA journal_mode=WAL");
sqlite.run("PRAGMA foreign_keys=ON");
// Migrations: add new columns to existing tables if not present
// SQLite does not support IF NOT EXISTS on ALTER TABLE, so we catch the error.
for (const sql of [
"ALTER TABLE users ADD COLUMN git_name TEXT",
"ALTER TABLE users ADD COLUMN git_email TEXT",
"ALTER TABLE patches ADD COLUMN author_name TEXT NOT NULL DEFAULT ''",
"ALTER TABLE patches ADD COLUMN author_email TEXT NOT NULL DEFAULT ''",
]) {
try {
sqlite.run(sql);
} catch {
// Column already exists — ignore
}
}
export const db = new Kysely<Database>({
dialect: new BunSqliteDialect({ database: sqlite }),
});