-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.ts
44 lines (38 loc) · 942 Bytes
/
knexfile.ts
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
import { types } from 'pg';
import config = require('config');
const DATE_OID = 1082;
const parseDate = (value : any) => value;
types.setTypeParser(DATE_OID, parseDate);
interface IConfig {
[key: string]: any;
}
const knexConfig : IConfig = {
development: {
client: 'pg',
connection: process.env.DB || config.get('DB'),
migrations: {
directory: './db/migrations',
},
seeds: { directory: './db/seeds' },
pool: { min: 0, max: 5 },
},
test: {
client: 'pg',
connection: process.env.DB || config.get('DB'),
migrations: {
directory: './db/migrations',
},
seeds: { directory: './db/seeds' },
pool: { min: 0, max: 5 },
},
production: {
client: 'pg',
connection: process.env.DB || config.get('DB'),
migrations: {
directory: './db/migrations',
},
seeds: { directory: './db/seeds' },
pool: { min: 0, max: 5 },
},
};
export default knexConfig;