remove migration

AuthorKonata <konata@posteo.jp>
Date
Commit7e2e62e1b457c09f3152c58bf97f8ff95b8ac669
Parent75550df
1 file changed, 15 deletions(-)
Msrc/db/index.ts
@@ -168,21 +168,6 @@ const sqlite = new BunDatabase(DB_PATH);
168168 sqlite.run("PRAGMA journal_mode=WAL");
169169 sqlite.run("PRAGMA foreign_keys=ON");
170170
171-// Migrations: add new columns to existing tables if not present
172-// SQLite does not support IF NOT EXISTS on ALTER TABLE, so we catch the error.
173-for (const sql of [
174- "ALTER TABLE users ADD COLUMN git_name TEXT",
175- "ALTER TABLE users ADD COLUMN git_email TEXT",
176- "ALTER TABLE patches ADD COLUMN author_name TEXT NOT NULL DEFAULT ''",
177- "ALTER TABLE patches ADD COLUMN author_email TEXT NOT NULL DEFAULT ''",
178-]) {
179- try {
180- sqlite.run(sql);
181- } catch {
182- // Column already exists — ignore
183- }
184-}
185-
186171 export const db = new Kysely<Database>({
187172 dialect: new BunSqliteDialect({ database: sqlite }),
188173 });