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