/** * Dev environment reset script. * * Tears down the local Postgres container and deletes its volume (all local * data is lost), then performs a fresh startup: container up, migrate, seed, * Next.js dev server. * * Use this when you want a completely clean local database — e.g. after a * destructive schema change or to reproduce a fresh-install scenario. * * Usage: pnpm dev:reset */ import { execSync } from "child_process"; import { main } from "./dev.mjs"; console.log("\n⚠ Resetting dev environment — all local data will be deleted."); execSync("docker compose -f docker-compose.dev.yaml down -v", { stdio: "inherit", shell: true, }); console.log("\n▸ Restarting from scratch..."); await main();