-
Notifications
You must be signed in to change notification settings - Fork 0
/
knexfile.js
50 lines (46 loc) · 984 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
42
43
44
45
46
47
48
49
50
require('dotenv').config();
const localPgConnection = {
host: 'localhost',
database: 'my_db',
user: 'username',
password: 'password'
};
const prodDbConnection = process.env.DATABASE_URL || localPgConnection;
module.exports = {
development: {
client: 'sqlite3',
useNullAsDefault: true,
connection: {
filename: './src/database/dev.sqlite3'
},
migrations: {
directory: './src/database/migrations'
},
seeds: {
directory: './src/database/seeds'
}
},
testing: {
client: 'sqlite3',
useNullAsDefault: true,
connection: {
filename: './src/database/test.sqlite3'
},
migrations: {
directory: './src/database/migrations'
},
seeds: {
directory: './src/database/seeds'
}
},
production: {
client: 'pg',
connection: prodDbConnection,
migrations: {
directory: './src/database/migrations'
},
seeds: {
directory: './src/database/seeds'
}
}
};