forked from liberuum/ql-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.js
59 lines (56 loc) · 1.37 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
// Read the postgres connection string from the environment variables.
// Format: postgresql://user:password@host/dbname
if (!process.env.PG_CONNECTION_STRING) {
console.error(
"ATTENTION: PG_CONNECTION_STRING not set! Run PG_CONNECTION_STRING=postgresql://makerdao:pwd@localhost/EcosystemApi or similar.",
);
} else {
console.debug("PG_CONNECTION_STRING: " + process.env.PG_CONNECTION_STRING);
}
/**
* @type { Object.<string, import("knex").Knex.Config> }
*/
export default {
development: {
client: "pg",
connection: {
connectionString: process.env.PG_CONNECTION_STRING,
ssl: { rejectUnauthorized: false },
},
migrations: {
tableName: "knex_migrations",
},
seeds: {
directory: "./seeds",
},
pool: { min: 0, max: 7 },
},
staging: {
client: "pg",
connection: {
connectionString: process.env.PG_CONNECTION_STRING,
ssl: { rejectUnauthorized: false },
},
migrations: {
tableName: "knex_migrations",
},
seeds: {
directory: "./seeds",
},
pool: { min: 0, max: 7 },
},
production: {
client: "pg",
connection: {
connectionString: process.env.PG_CONNECTION_STRING,
ssl: { rejectUnauthorized: false },
},
migrations: {
tableName: "knex_migrations",
},
seeds: {
directory: "./seeds",
},
pool: { min: 0, max: 7 },
},
};