import { Kysely } from "kysely"; const CONFIG_TABLE = "app_config"; const SCHEMA_VERSION = "2025-09-30"; export async function up(db: Kysely) { await db.schema .createTable(CONFIG_TABLE) .ifNotExists() .addColumn("key", "varchar", (col) => col.notNull().primaryKey()) .addColumn("value", "text", (col) => col.notNull()) .execute(); await db .updateTable("schema_migration") .set({ version: SCHEMA_VERSION, dirty: 0 }) .execute(); } export async function down(_db: Kysely) { throw new Error("Downward migrations are not supported. Restore from backup."); }