Generate Update Scripts with Liquibase
How to run Liquibase to genereate update SQL for KFS upgrades.
Step-by-step guide
Edit the liquibase.properties file and make sure the values are valid
# rename this to liquibase.properties when testing
classpath=/kuali/drivers/ojdbc6.jar
driver=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@localhost:1525:kfsupdev
username=kfs_upsnd
password=<password>
Copy the liquibase.properties file into the specific version folder.
For example,
cp liquibase.properties kfs/work/db/upgrades/5.2_5.3/db
Ensure that the liquibase jar file is available
It is usually in the upgrades/<version> folders
$ ls kfs/work/db/upgrades/5.2_5.3/liquibase*
/kuali/projects/dave/kfs53/work/db/upgrades/5.2_5.3/liquibase-2.0.5.jar
Run liquibase from the db directory
cd kfs/work/db/upgrades/5.2_5.3/db
java -jar ../liquibase-2.0.5.jar --logLevel=debug --changeLogFile=master-data-script.xml updateSQL > updateSQLdata.sql
Repeat the above for each child folder (structure, data, constraint) that contains liquibase scripts.
Related articles