-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathknexfile.js
45 lines (42 loc) · 1.04 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
// 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: process.env.PG_CONNECTION_STRING,
migrations: {
tableName: 'knex_migrations'
},
seeds: {
directory: './seeds'
}
},
staging: {
client: 'pg',
connection: process.env.PG_CONNECTION_STRING,
migrations: {
tableName: 'knex_migrations'
},
seeds: {
directory: './seeds'
}
},
production: {
client: 'pg',
connection: process.env.PG_CONNECTION_STRING,
migrations: {
tableName: 'knex_migrations'
},
seeds: {
directory: './seeds'
}
}
};