Files
usenet-indexer/config/database.ts
T
Daan MeijerandClaude Opus 5.5 0714b2c81a Rebuild: a dedicated Postgres for development (its own database, as in production)
The shared database's public schema leaked the old indexer's tables into
the generated schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:19:51 +02:00

36 lines
906 B
TypeScript

import env from '#start/env'
import app from '@adonisjs/core/services/app'
import { defineConfig } from '@adonisjs/lucid'
/**
* The rebuild's own database (REBUILD.md, decision b), on the same server
* as the current indexer's.
*/
const dbConfig = defineConfig({
connection: 'pg',
connections: {
pg: {
client: 'pg',
connection: {
host: env.get('DB_HOST'),
port: env.get('DB_PORT'),
user: env.get('DB_USER'),
password: env.get('DB_PASSWORD'),
database: env.get('DB_DATABASE'),
},
pool: { min: 0, max: env.get('DB_POOL_MAX', 10) },
migrations: {
naturalSort: true,
paths: ['database/migrations'],
},
schemaGeneration: {
enabled: true,
rulesPaths: ['./database/schema_rules.js'],
},
debug: app.inDev && env.get('DB_DEBUG', false),
},
},
})
export default dbConfig