fix: update schema to fix multiple primary key issues and switch to node-postgres

- Replace primaryKey constraints with uniqueIndex where needed
- Fix schema for Auth, Contacts, Exchange Rates, Expense Participants, and Accounts tables
- Add missing import for uniqueIndex
- Switch from postgres.js to node-postgres (pg) for Drizzle
- Add proper type safety with TypeScript
- Add graceful shutdown of database connections
This commit is contained in:
2025-05-27 18:01:40 -04:00
parent 74b7ddf3d6
commit f9d5f8b404
17 changed files with 1618 additions and 25 deletions

5
backend/.env.example Normal file
View File

@@ -0,0 +1,5 @@
PORT=3000
DATABASE_URL=postgres://postgres:postgres@localhost:5432/splitwise
JWT_SECRET=your-jwt-secret-key-here
NODE_ENV=development
DATABASE_SSL=false