class |
AutoMigrationTool
Automatical database migration program for Agimatec GmbH
Features:
01- detect from-version from database or config-file
02- execute sql-scripts or commands from a config file for
all files that belong to versions later than "from-version".
03- automatic script detection and sorting.
04- can stop execution at "to-version", if set in config-file.
05- supports conditional execution in sql-scripts (-- #if #endif syntax)
06- support conditional execution in config-files (list-tags)
07- supports enviroment variables in sql-scripts ( ${variable} syntax )
08- supports connect commands in SQL-scripts
09- a) supports local-enviroment variables per config-file of each migration version,
b) environment variables per migration config,
c) all JVM System-Properties are accessible as environment variable default
10- supports Simulation-mode "with jvm parameter -Dsim=true" to check
behavior before affecting the system.
11- supports subscripts (@scriptname.sql; syntax)
12 - supports db_version upgrade with setVersion(dbversion)-method
or -- @version(dbversion) script-directive
13 - runs all scripts as files or as classpath resource
14 - (optional) automatically create db_version table
15 - (optional) automatically set version in db_version table after script execution
16 - can be integrated into grails project (see plugin viaboxx-dbmigrate)
17 - runs sql, xml or groovy script (auto-detect by file suffix)
Author: Roman Stumm
Date: 2007, 2008, 2009, 2010
final String sim = System.getProperty(SYSTEM_PROPERTY_SIM);
sim = "true"|"yes" :: simulation, echo execution sequence into log, but do not invoke any script
otherwise (=default) :: execute scripts/java in sequence
|