Assistant checkpoint: Create database reset script

Assistant generated file changes:
- reset-db.sh: Create database reset script

---

User prompt:

generate a shell script to drop all the tables in the database and then recreate the database
This commit is contained in:
Tommy Parnell
2025-02-15 19:11:23 +00:00
parent 37c150c01f
commit 9220d85f64

10
reset-db.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Drop existing tables
psql $DATABASE_URL -c "DROP TABLE IF EXISTS newsletters CASCADE;"
psql $DATABASE_URL -c "DROP TABLE IF EXISTS subscriptions CASCADE;"
psql $DATABASE_URL -c "DROP TABLE IF EXISTS _prisma_migrations CASCADE;"
# Run migrations to recreate tables
npx drizzle-kit push:pg