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>
36 lines
906 B
TypeScript
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
|