-
Notifications
You must be signed in to change notification settings - Fork 0
/
knexfile.js
39 lines (36 loc) · 973 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
require('dotenv').config();
const config = {
test: {
client: "sqlite",
useNullAsDefault: true,
connection: {
filename: __dirname + '/db/testdb.sqlite'
},
migrations: {
directory: "./db/migrations",
tableName: "knex_migrations",
},
seeds: {
directory: "./db/seeds",
}
},
development: {
client: "pg",
version: "9.6.6",
connection: {
host: process.env.PG_HOST,
port: process.env.PG_PORT || 5432,
user: process.env.PG_USER,
password: process.env.PG_PASSWORD,
database: process.env.PG_ANDYBOT_DB
},
migrations: {
directory: "./db/migrations",
tableName: "knex_migrations",
},
seeds: {
directory: "./db/seeds",
}
}
}
module.exports = config[process.env.NODE_ENV] || config['development'];