This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathknexfile.ts
67 lines (63 loc) · 1.77 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Update with your config settings.
require('dotenv').config({ path: __dirname + '/.env' });
const config = {
development: {
client: 'mysql2',
connection: {
host: process.env.DB_DEV_HOST,
database: process.env.DB_DEV_DB,
user: process.env.DB_DEV_USER,
password: process.env.DB_DEV_PASS,
port: parseInt(process.env.DB_DEV_PORT || '3306'),
},
pool: {
min: 2,
max: 10,
},
migrations: {
tableName: 'migrations',
loadExtensions: ['.ts'],
extension: 'ts',
},
},
test: {
client: 'mysql2',
connection: {
host: process.env.DB_TEST_HOST,
database: process.env.DB_TEST_DB,
user: process.env.DB_TEST_USER,
password: process.env.DB_TEST_PASS,
port: parseInt(process.env.DB_TEST_PORT || '3306'),
},
pool: {
min: 2,
max: 10,
},
migrations: {
tableName: 'migrations',
loadExtensions: ['.ts'],
extension: 'ts',
},
},
production: {
client: 'mysql2',
connection: {
host: process.env.DB_PROD_HOST,
database: process.env.DB_PROD_DB,
user: process.env.DB_PROD_USER,
password: process.env.DB_PROD_PASS,
port: parseInt(process.env.DB_PROD_PORT || '3306'),
},
pool: {
min: 2,
max: 10,
},
migrations: {
tableName: 'migrations',
loadExtensions: ['.ts'],
extension: 'ts',
},
},
};
export default config;
module.exports = config; // DO NOT remove this or it will break dist version