This commit is contained in:
parent
f828ca4491
commit
cb51a4136f
167 changed files with 21485 additions and 21212 deletions
|
@ -5,52 +5,53 @@
|
|||
* file.
|
||||
*/
|
||||
|
||||
import Env from '@ioc:Adonis/Core/Env';
|
||||
import { DatabaseConfig } from '@ioc:Adonis/Lucid/Database';
|
||||
import env from '#start/env';
|
||||
// import { DatabaseConfig } from "@adonisjs/lucid/database";
|
||||
import { defineConfig } from "@adonisjs/lucid";
|
||||
|
||||
const databaseConfig: DatabaseConfig = {
|
||||
const databaseConfig = defineConfig({
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The primary connection for making database queries across the application
|
||||
| You can use any key from the `connections` object defined in this same
|
||||
| file.
|
||||
|
|
||||
*/
|
||||
connection: env.get('DB_CONNECTION'),
|
||||
|
||||
connections: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The primary connection for making database queries across the application
|
||||
| You can use any key from the `connections` object defined in this same
|
||||
| file.
|
||||
|
|
||||
*/
|
||||
connection: Env.get('DB_CONNECTION'),
|
||||
|
||||
connections: {
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PostgreSQL config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configuration for PostgreSQL database. Make sure to install the driver
|
||||
| from npm when using this connection
|
||||
|
|
||||
| npm i pg
|
||||
|
|
||||
*/
|
||||
pg: {
|
||||
client: 'pg',
|
||||
connection: {
|
||||
host: Env.get('PG_HOST'),
|
||||
port: Env.get('PG_PORT'),
|
||||
user: Env.get('PG_USER'),
|
||||
password: Env.get('PG_PASSWORD', ''),
|
||||
database: Env.get('PG_DB_NAME'),
|
||||
},
|
||||
searchPath: ['gba', 'public'],
|
||||
migrations: {
|
||||
naturalSort: true,
|
||||
},
|
||||
healthCheck: false,
|
||||
debug: false,
|
||||
pool: { min: 1, max: 100 },
|
||||
},
|
||||
|--------------------------------------------------------------------------
|
||||
| PostgreSQL config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Configuration for PostgreSQL database. Make sure to install the driver
|
||||
| from npm when using this connection
|
||||
|
|
||||
| npm i pg
|
||||
|
|
||||
*/
|
||||
pg: {
|
||||
client: 'pg',
|
||||
connection: {
|
||||
host: env.get('PG_HOST'),
|
||||
port: env.get('PG_PORT'),
|
||||
user: env.get('PG_USER'),
|
||||
password: env.get('PG_PASSWORD', ''),
|
||||
database: env.get('PG_DB_NAME'),
|
||||
},
|
||||
searchPath: ['gba', 'public'],
|
||||
migrations: {
|
||||
naturalSort: true,
|
||||
},
|
||||
healthCheck: false,
|
||||
debug: false,
|
||||
pool: { min: 1, max: 100 },
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export default databaseConfig;
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue