This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knexfile.js
89 lines (86 loc) · 1.88 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
development: {
client: 'postgresql',
connection: {
port: 5432,
host: 'localhost',
database: 'knex',
user: 'knex',
password: 'password',
},
pool: {
min: process.env.DATABASE_POOL_MIN,
max: process.env.DATABASE_POOL_MAX,
},
migrations: {
directory: './db/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './db/seeds',
},
},
staging: {
client: 'postgresql',
connection: {
port: process.env.DATABASE_PORT,
host: process.env.DATABASE_HOST,
database: process.env.DATABASE_NAME,
user: process.env.DATABASE_USER,
password: process.env.DATABASE_ACCESS_KEY,
},
pool: {
min: process.env.DATABASE_POOL_MIN,
max: process.env.DATABASE_POOL_MAX,
},
migrations: {
directory: './db/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './db/seeds',
},
},
test: {
client: 'postgresql',
connection: {
port: 5432,
host: 'localhost',
database: 'knex',
user: 'knex',
password: 'password',
},
pool: {
min: process.env.DATABASE_POOL_MIN,
max: process.env.DATABASE_POOL_MAX,
},
migrations: {
directory: './db/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './db/seeds',
},
},
production: {
client: 'postgresql',
connection: {
port: process.env.DB_PORT,
host: process.env.DB_HOST,
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
},
pool: {
min: process.env.DATABASE_POOL_MIN,
max: process.env.DATABASE_POOL_MAX,
},
migrations: {
directory: './db/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './db/seeds',
},
}
};