feat(db): add PostgreSQL connection, migration runner, and seed data
- Add pool export and graceful shutdown hook to db/index.ts - Create migrate.ts — programmatic migration runner using drizzle-orm/migrator - Create seed.ts — idempotent seed script with sample users, subscriptions, watchlist items, exposures, alerts, blog posts, properties, and removal requests - Create db.test.ts — unit tests for db, migrate, and seed module exports - Add web/.env.example documenting DATABASE_URL - Add db:generate, db:push, db:migrate, db:seed scripts to web/package.json
This commit is contained in:
1
web/.env.example
Normal file
1
web/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/shieldai"
|
||||
Reference in New Issue
Block a user