-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.js
46 lines (45 loc) · 1.07 KB
/
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
const path = require('path')
module.exports = {
development: {
client: 'pg',
connection: {
host: '127.0.0.1',
user: 'postgres',
password: 'root',
database: 'tasks_dev'
},
migrations: {
directory: path.resolve(__dirname, 'src', 'database', 'migrations')
},
seeds: {}
},
test: {
client: 'pg',
connection: {
// host: '127.0.0.1',
// user: 'postgres',
// password: 'root',
// database: 'tasks_test',
connectionString: process.env.HEROKU_POSTGRESQL_MAROON_URL,
ssl: { rejectUnauthorized: false }
},
migrations: {
directory: path.resolve(__dirname, 'src', 'database', 'migrations')
},
seeds: {
directory: path.resolve(__dirname, 'src', 'database', 'seeds'),
},
useNullAsDefault: true,
},
production: {
client: 'pg',
connection: {
connectionString: process.env.DATABASE_URL,
ssl: { rejectUnauthorized: false }
},
migrations: {
directory: path.resolve(__dirname, 'src', 'database', 'migrations')
},
seeds: {}
}
}