-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathknexfile.js
57 lines (53 loc) · 1.71 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
module.exports = {
development: {
client: "postgresql",
connection: {
host: process.env.PGHOST || "localhost",
port: process.env.PGPORT || 5432,
database: "cup2024",
user: "cup2024",
password: "123456",
application_name: "knex-development",
},
migrations: {
tableName: "knex_migrations",
},
debug: false,
asyncStackTraces: true,
pool: {
min: 0,
max: 1,
},
},
production: {
client: "postgresql",
connection: {
host: process.env.PGHOST,
port: process.env.PGPORT,
database: process.env.PGDATABASE,
user: process.env.PGUSER,
password: process.env.PGPASSWORD,
application_name: "knex-production",
},
pool: {
// See here for all config options:
// https://github.com/vincit/tarn.js/
min: 2,
max: 10,
// acquire promises are rejected after this many milliseconds
// if a resource cannot be acquired
acquireTimeoutMillis: 30000,
// create operations are cancelled after this many milliseconds
// if a resource cannot be acquired
createTimeoutMillis: 30000,
// If true, when a create fails, the first pending acquire is
// rejected with the error. If this is false (the default) then
// create is retried until acquireTimeoutMillis milliseconds has
// passed.
propagateCreateError: false,
},
migrations: {
tableName: "knex_migrations",
},
},
};