-
Notifications
You must be signed in to change notification settings - Fork 4
/
sqldiff.template.properties
176 lines (133 loc) · 6.35 KB
/
sqldiff.template.properties
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
###############################################################################
# sqldiff config file #
# https://github.com/tbrugz/sqldump #
###############################################################################
# "main()" class is 'tbrugz.sqldiff.SQLDiff'
#
# sqldiff works like a unix diff utility, "patching" the source with the difference to produce the target
# alternatively: target (minuend) - source (subtrahend) == diff/patch ; source + diff == target
#
# see: http://en.wikipedia.org/wiki/Difference_(computer_science)
#
# source & target ids are defined by 'sqldiff.source' & 'sqldiff.target' properties
#
# includes other properties files
#@includes = credentials.properties, other.properties, ${propfilebasedir}/prop-x.properties
sqldiff.target=id2
sqldiff.source=id1
inputdir=input
outputdir=output
# patterns that may be used: [schemaname], [objecttype], [objectname], [changetype]
sqldiff.outfilepattern=${outputdir}/diff-[schemaname]-[objecttype].sql
# fail on error ? (default is true)
#sqldiff.failonerror=true|false
# types to diff (default: all)
#sqldiff.typestodiff=TABLE, COLUMN, CONSTRAINT, GRANT, VIEW, TRIGGER, EXECUTABLE, SYNONYM, INDEX, SEQUENCE
# add comments to DDL scripts (default is true)
#sqldiff.addcomments=false
# when to use temp column strategy for column-diff
# possible values: ALWAYS > NEWPRECISIONSMALLER > TYPESDIFFER > NEVER
# default is NEVER
sqldiff.columndiff.tempcolstrategy=NEVER
# use 'replace' changetype for dbidDiffs (default is true)
#sqldiff.dbiddiff.usereplace=true
# whitespace ignore strategy (used for VIEWs, TRIGGERs, EXECUTABLEs)
# options: NONE, SOL (start of line), EOL (end of line), SOL+EOL, ALL
# (default is EOL)
#sqldiff.whitespace-ignore=EOL
# XML input file. If defined, sqldiff ignores source & target grabbers
sqldiff.input.xmlfile=${inputdir}/diff.xml
# XML output file. If defined, sqldiff also outputs the diff in XML format
sqldiff.output.xmlfile=${outputdir}/diff.xml
# JSON input file. If defined, sqldiff ignores source & target grabbers
sqldiff.input.jsonfile=${inputdir}/diff.json
# JSON output file. If defined, sqldiff also outputs the diff in JSON format
sqldiff.output.jsonfile=${outputdir}/diff.json
# Patch (unified diff) output file (experimental). If defined, sqldiff also outputs the diff in this format
sqldiff.output.patch.file=${outputdir}/diff.patch
# number of lines of context for each hunk/delta (default is 3)
#sqldiff.output.patch.contextsize=3
# optionally deletes regular files from dir before diff dump
#sqldiff.deleteregularfilesfromdir=${outputdir}
#-----------------
### schema transformations ###
# transform target dialect to souce's dialect (using SQLDialectTransformer) - transforms data (column) types
#sqldiff.schemadiff.transform-target-dialect-to-source=true
# executes processors on source/target models before diff
#sqldiff.schemadiff.source.processors=SchemaModelTransformer, xtraproc.ModelSQLIdTransformer, ...
#sqldiff.schemadiff.target.processors=...
#-----------------
### table/column rename detection ###
# do rename detection? (default is false)
sqldiff.dorenamedetection=true
# minimum similarity (default is 0.5)
sqldiff.renamedetection.minsimilarity=0.5
# object types to detect renames (default is 'all')
#sqldiff.renamedetection.types=TABLE, COLUMN, INDEX, CONSTRAINT
#-----------------
### datadiff ###
# default is false (no datadiff)
sqldiff.dodatadiff=true|false
# syntaxes to diff data - if none specified, sql diff (SQLDataDiffSyntax) will be used
# available syntaxes: sql (SQLDataDiffSyntax) & html (HTMLDiff)
sqldiff.datadiff.syntaxes=SQLDataDiffSyntax, HTMLDiff
sqldiff.datadiff.outfilepattern=${outputdir}/datadiff/diff_[tablename]_[changetype].[fileext]
# if no connection provided, datadiff may import sql inserts from file
# (by default, into h2 memory database)
sqldiff.datadiff.<id>.indatafilepattern=${outputdir}/dump/data_[tablename].sql
# optional properties
sqldiff.datadiff.tables=TABLE_X, TABLE_Y
sqldiff.datadiff.ignoretables=TABLE_Z, TABLE_ABC
sqldiff.datadiff.looplimit=1000
# charset to be used when importing sql inserts from files (default is UTF-8)
sqldiff.datadiff.importcharset=UTF-8|ISO-8859-1
# use common columns between source & target tables based on column's name (default is false)
sqldiff.datadiff.usecommoncolumns=true
# add (or not) comments to DML statements (default is true)
sqldiff.datadiff.addcomments=false
#-----------------
# apply diff to id (db connection) - 'apply patch' - experimental
# apply diff (main prop)? use with caution - default is false
#sqldiff.doapplydiff=true
# apply diff to source - default is false
#sqldiff.applydiff.tosource=true
# apply diff to connection id
#sqldiff.applydiff.toconn=sqldiff.id1
# apply schema diff? '.doapplydiff' prop must also be true
#sqldiff.doapplyschemadiff=true
# apply data diff? '.doapplydiff' & '.dodatadiff' props must also be true
#sqldiff.doapplydatadiff=true
# object types to apply diff (default is all)
# types: TABLE, COLUMN, GRANT, ...
#sqldiff.applydiff.objecttypes=<objecttype>[,<objecttype>]
# types of diff to apply based on ChangeType (default is all)
# types: ADD, ALTER, DROP, RENAME, REPLACE, REMARKS
#sqldiff.applydiff.changetypes=<changetype>[,<changetype>]
# filter types of diff to apply based on ChangeType & ObjectType
# types: ADD, ALTER, DROP, RENAME, REPLACE, REMARKS
# e.g.: sqldiff.applydiff.DROP=COLUMN, TABLE
#sqldiff.applydiff.<changetype>=<objecttype>[,<objecttype>]
#-----------------
# sqldump-inherited properties (defaults below)
#sqldump.schemadump.usecreateorreplace=false
#sqldump.schemadump.quoteallsqlidentifiers=false
# sqldump properties
sqldump.schemagrab.schemas=ZZZ
#sqldump.schemagrab.db-specific-features=true
#-----------------
# grabclass can be: JDBCSchemaGrabber, JAXBSchemaXMLSerializer
# not yet sqldiff-ready: SchemaSerializer, CastorSchemaXMLSerializer
# to select a different connection properties prefix
#sqldiff.id1.connpropprefix=sqldump.dev
# id1 - JDBCSchemaGrabber
sqldiff.id1.grabclass=JDBCSchemaGrabber
# Derby Embedded
#sqldiff.id1.driverclass=org.apache.derby.jdbc.EmbeddedDriver
#sqldiff.id1.dburl=jdbc:derby:<db-path>
#sqldiff.id1.user=sa
#sqldiff.id1.password=sa
# Using '.connpropprefix'
#sqldiff.id1.connpropprefix=sqldiff.conn1
# id2 - JAXB
sqldiff.id2.grabclass=JAXBSchemaXMLSerializer
#sqldiff.id2.infile=work/schemaModel.jaxb.xml