// reset-db.ts // Development command to wipe the database and apply all migrations from scratch import { connectionConfig, migrate, pool } from "../database"; import { dropTables, exitIfUnforced } from "./util"; async function main(): Promise { exitIfUnforced(); try { await dropTables(); console.log(""); await migrate(); console.log(""); console.log("Database reset complete."); } finally { await pool.end(); } } main().catch((err) => { console.error("Failed to reset database:", err.message); process.exit(1); });