Version Upgrades in OLE
As newer versions of OLE gets released, option to apply db changes for new functionality for existing implementation sites is crucial. In OLE, this is handled via the following process;
Database changes are authored via liquibase changelog files. An example would be
Changelog<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> <changeSet context="bootstrap" author="ole" id="OLE_DLVR_PTRN_BILL_FEE_TYP_T"> <addColumn catalogName="ole" schemaName="ole" tableName="OLE_DLVR_PTRN_BILL_FEE_TYP_T "> <column name="DUE_DT_TIME" type="datetime"/> <column name="CHECK_OUT_DT_TIME" type="datetime"/> </addColumn> </changeSet> </databaseChangeLog>
In order to execute the change set on an existing OLE database, simply issue the following command; This will execute the sql for MySQL and Oracle.
NEEDS TO BE TESTED THROUGHLY
WARNING: This requires some additional setup and will be updated; Not ready to be used yet.
cd ${project.directory}/ole-app/ole-db/ole-liquibase/ole-liquibase-upgrade For MySql: mvn clean install -Prun-liquibase-upgrade,mysql -Dimpex.scm.phase=none For Oracle: mvn clean install -Prun-liquibase-upgrade,oracle -Dimpex.scm.phase=none
In order to generate the SQL for the change log so that it can be made available for folks to take sql and execute themselves, simply issue the following command:
cd ${project.directory}/ole-app/ole-db/ole-liquibase/ole-liquibase-upgrade For MySQL mvn clean install -Pgenerate-upgrade-sql,mysql -Dimpex.scm.phase=none (-Dsql.database=ole -Dsql.username=[fill me] -Dsql.password=[fill me] -Djdbc.url=[fill me]) For Oracle mvn clean install -Pgenerate-upgrade-sql,oracle -Dimpex.scm.phase=none (-Dsql.database=ole -Dsql.username=[fill me] -Dsql.password=[fill me] -Djdbc.url=[fill me]) The generated sql will be under: ${project.dir}/ole-app/ole-db/ole-sql/ole-liquibase-upgrade-sql/src/main/resources/org/kuali/ole/sql/mysql - MySQL ${project.dir}/ole-app/ole-db/ole-sql/ole-liquibase-upgrade-sql/src/main/resources/org/kuali/ole/sql/oracle - Oracle For MySQL execute the sql in this way: mysql --delimiter=/ -u ${dbusername} -p ole < ${project.dir}/ole-app/ole-db/ole-sql/ole-liquibase-upgrade-sql/src/main/resources/org/kuali/ole/sql/mysql/[version of the sql you want to execute].sql
Operated as a Community Resource by the Open Library Foundation