-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
58 lines (51 loc) · 1.56 KB
/
config.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
const crypto = require('crypto');
const os = require('os');
const path = require('path');
module.exports = {
host: "",
port: "",
dbname: "",
username: "",
password: "",
psql: "psql",
pgdump: "pg_dump",
schemaDumpAdditionalArgs: ["--no-owner", "--no-acl"],
verbose: false,
env: false,
migrationDir: "",
upDirs: [],
downDirs: [],
repetableDirs: [],
repetableBeforeDirs: [],
beforeDirs: [],
afterDirs: [],
upPrefix: "V",
downPrefix: "U",
repetablePrefix: "R",
repetableBeforePrefix: "R_before",
beforePrefix: "before",
afterPrefix: "after",
separatorPrefix: "__",
migrationExtensions: [".sql"],
recursiveDirs: false,
keepMigrationDirHistory: false,
tmpDir: path.join(os.tmpdir(), "___pgmigrations"),
historyTableName: "schema_history",
historyTableSchema: "pgmigrations",
skipPattern: "scrap",
useProceduralScript: false,
warnOnInvalidPrefix: true,
parseScriptTags: true,
hashFunction: function(data) {
const hash = crypto.createHash('sha1');
hash.update(data);
return hash.digest('hex');
},
sortByPath: true,
sortFunction: (a, b, config) => config.sortByPath ? a.script.localeCompare(b.script, "en") : a.name.localeCompare(b.name, "en"),
versionSortFunction: (a, b, config) => a.version.localeCompare(b.version, "en", {numeric: true}),
testFunctionsSchemaSimilarTo: "test",
testFunctionsNameSimilarTo: null,
testFunctionsCommentSimilarTo: null,
testAutomaticallyRollbackFunctionTests: false
}