feat: db pool + migration runner with idempotency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-05-31 02:05:53 +10:00
parent 45186f7566
commit 789ab8fca8
5 changed files with 102 additions and 0 deletions

8
lib/db/pool.js Normal file
View File

@@ -0,0 +1,8 @@
import pg from 'pg';
import 'dotenv/config';
export const pool = new pg.Pool({
connectionString: process.env.DATABASE_URL,
max: 10,
idleTimeoutMillis: 30_000
});