Source

sqldump / sqldiff.template.properties

Full commit

###############################################################################
# sqldiff config file                                                         #
# https://bitbucket.org/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

# 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}

#-----------------

### table/column rename detection ###

# do rename detection? (default is false)
sqldiff.dorenamedetection=true
# minimum similarity (default is 0.5)
sqldiff.renamedetection.minsimilarity=0.5

#-----------------

### datadiff ###

# default is false (no datadiff)
sqldiff.dodatadiff=true|false
# syntaxes to diff data - if none specified, sql diff (SQLDataDiffSyntax) will be used
# avaiable 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

#-----------------

# sqldump-inherited properties (defaults below)
#sqldump.schemadump.usecreateorreplace=false
#sqldump.schemadump.quoteallsqlidentifiers=false

# old sqldump properties
sqldump.dumpschemapattern=ZZZ
#sqldump.usedbspecificfeatures=true

#-----------------

# grabclass can be: JDBCSchemaGrabber, JAXBSchemaXMLSerializer
# not yet sqldiff-ready: SchemaSerializer, CastorSchemaXMLSerializer

# 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

# id2 - JAXB
sqldiff.id2.grabclass=JAXBSchemaXMLSerializer
#sqldiff.id2.infile=work/schemaModel.jaxb.xml