Database Workflow
During Development
Use pnpm db:push for fast schema iteration. If you want a clean slate, delete the Docker container and re-run ./start-database.sh.
Before Merging (with schema changes)
This is important — follow these steps:
- Clear your database (delete the Docker container, re-run
./start-database.sh) - Run
pnpm db:generateto create migration files - Run
pnpm db:migrateto apply them - Test the branch to make sure everything works with a fresh migration