2019-08-31 04:43:35 +05:00
|
|
|
const path = require('path');
|
2022-06-20 18:27:39 +02:00
|
|
|
const dotenv = require('dotenv');
|
2019-10-01 04:18:33 +05:00
|
|
|
const _ = require('lodash');
|
2019-08-31 04:43:35 +05:00
|
|
|
|
2022-06-20 18:27:39 +02:00
|
|
|
dotenv.config({
|
2019-11-05 18:01:42 +05:00
|
|
|
path: path.resolve(__dirname, '../.env'),
|
2019-08-31 04:07:25 +05:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
client: 'pg',
|
2023-02-27 17:16:51 +01:00
|
|
|
connection: {
|
|
|
|
connectionString: process.env.DATABASE_URL,
|
|
|
|
ssl: {
|
|
|
|
rejectUnauthorized: false,
|
|
|
|
},
|
|
|
|
},
|
2019-08-31 04:07:25 +05:00
|
|
|
migrations: {
|
2019-11-05 18:01:42 +05:00
|
|
|
tableName: 'migration',
|
2020-04-24 21:44:54 +05:00
|
|
|
directory: path.join(__dirname, 'migrations'),
|
|
|
|
},
|
|
|
|
seeds: {
|
|
|
|
directory: path.join(__dirname, 'seeds'),
|
2019-10-01 04:18:33 +05:00
|
|
|
},
|
2019-11-05 18:01:42 +05:00
|
|
|
wrapIdentifier: (value, origImpl) => origImpl(_.snakeCase(value)),
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|