-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.js
41 lines (38 loc) · 970 Bytes
/
knexfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require('dotenv').config()
const path = require('path')
/**
* @type { Object.<string, import("knex").Knex.Config> }
*/
module.exports = {
development: {
client: process.env.DATABASE_CLIENT,
connection: process.env.DATABASE_URL,
migrations: {
tableName: 'knex_migrations',
directory: path.resolve(__dirname, 'src', 'database', 'migrations'),
},
seeds: {
directory: path.resolve(__dirname, 'src', 'database', 'seeds'),
},
useNullAdsDefault: true,
pool: {
max: 3,
min: 0,
idleTimeoutMillis: 1000,
},
},
production: {
client: process.env.DATABASE_CLIENT,
connection: process.env.DATABASE_URL,
migrations: {
tableName: 'knex_migrations',
directory: path.resolve(__dirname, 'src', 'database', 'migrations'),
},
pool: {
max: 3,
min: 0,
idleTimeoutMillis: 1000,
},
useNullAsDefault: true,
},
}