-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathknexfile.js
60 lines (51 loc) · 1.32 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
// Update with your config settings.
const config = {
user: process.env.DB_USER, // e.g. 'my-user'
password: process.env.DB_PASS, // e.g. 'my-user-password'
database: process.env.DB_NAME, // e.g. 'my-database'
};
config.host = `${process.env.PROXY_SOCKET_DIR}/${process.env.CLOUD_SQL_INSTANCE_NAME}`;
module.exports = {
development: {
client: 'sqlite3',
connection: {
filename: './src/data/zicka.sqlite3',
},
migrations: {
directory: './src/data/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './src/data/seeds',
},
useNullAsDefault: true,
},
testing: {
client: 'pg',
connection: config,
migrations: {
directory: './src/data/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './src/data/seeds',
},
useNullAsDefault: true,
},
production: {
client: 'sqlite3',
connection: {
filename: './src/data/zicka.sqlite3',
},
migrations: {
directory: './src/data/migrations',
tableName: 'knex_migrations',
},
seeds: {
directory: './src/data/seeds',
},
useNullAsDefault: true,
}
};
// Remember - storing secrets in plaintext is potentially unsafe. Consider using
// something like https://cloud.google.com/kms/ to help keep secrets secret.