OLE has three two different application schemas for OLEFS , OLELS and OLEDOCSTORE respectively. All the three different schemas come with a baseline dataset that is required for the applications application's basic functionality. Details of individual application schemas, baseline data sets and process for adding or updating different tables in the respective schemas has been explained below;
Info |
---|
Even though the db refresh process seems to be different for different applications within OLE, the System Integration team will be working on unifying the process across the applications. |
...
A. The main db module
...
can be located under ole-app/ole-db. This has database definition and data files for OLE tables.
The four different maven modules for OLEFS DB are as follows;
- ole-impex- This is the parent module contains information about the baseline KFSthat has sub-modules that contains baseline OLEFS/LS/Rice datasets.
- ole-impex-master - This module has all the table definitions (schema.xml) along with data xml files for the base OLEFS/KFS datasets. This doesn't have any Rice related tables or data. For future KFS upgrades, any KFS table changes have to be updated here.
- ole-impex-rice - This module strictly contains the Rice table definitions (schema.xml) along with data xml files. The schema.xml that contains all the table definitions are modified for KFS needs, and so wont match with the schema.xml of the rice bootstrap dataset. Any future rice version upgrade changes will need to be accounted here (should come from KFS as KFS had modified rice tables)
- ole-impex-ls - This module contains all the table definitions (schema.xml) along with data.xml files for the base OLELS (Circulation and other library functions) datasets.
- ole-liquibase- This module contains information about any database changes or updates that need to be madeallows injecting data easily by the use of liquibase tooling. Typically all the data files should go in the ole-impex module, but anything that is more demo specific and needs to be ingested for development purposes go here.
- ole-liquibase-changeset - This module contains the definitions for any updates that needs to be made to the base OLE schema that contains the base KFS/Rice tables/data. The updates could include creation of new tables, populating with some data etc..
ole-sql - SQL Files under the various sub-modules are auto-generatedgenerated by maven commands run under the modules in 1 & 2. The various commands to produce sql statements for both MySQL and Oracle are explained below.
Warning The various SQL files are auto generated by the maven process on the ole-impex and ole-liquibase modules. Do not attempt to manually update these the sql files as they will be overridden anytime the build process is run on the ole-impex and ole-liquibase modules.
ole-liquibase-sql - These are auto-generated sql files from the ole-liquibase-changeset module.
Info The following must exist before you can run the maven commands;
user-LIQUIBASEBLANK
password-LIQUIBASEBLANKSchema-LIQUIBASEBLANK
No Format cd into the ole-app/ole-db/ole-liquibase/ole-liquibase-changeset module mvn clean install -Psql,mysql -Dscm.phase=none mvn clean process-resourcesinstall -Psql,mysqloracle -Dscm.phase=none
- ole-master-sql - These are auto-generated sql files from the ole-impex-master module.
ole-rice-sql - These are auto generated sql files from the ole-impex-rice module.
Info These auto-generated sql files gets executed by the maven-sql plugin on a database; weather be it MySQL or Oracle. Refer to the DB refresh process in the main Developer's guide.
cd into ole-impex mvn clean process-resources -Psql,mysqlNo Format No Format cd into ole-impex mvn clean install -Psql -Dimpex.scm.phase=none
B. The main db module for the Docstore application is under ole-docstore/ole-db. Refer to the db-reset process below to find out how to reset the docstore database and start clean.
C. DB reset
The DB reset involves dropping existing application schemas, re-creating them, creating tables, adding data and finally adding all the necessary constraints.
Code Block |
---|
cd ole-app mvn clean install -DskipTests=true cd olefs # For MySQL mvn initialize -Pdb -Djdbc.dba.username=[fill me in] -Djdbc.dba.password=[fill me |
...
Info |
---|
kuali-deploy.jar is a tool that helps with the generation of all the sql files etc, and so its important to know the right version of the kuali-deploy when try to extract and generate the sql files. |
...
OLELS - OLEFS has also a db refresh process similar to OLELS but is not as advanced as in the sql files have to be individually created for both MySQL and Oracle. The Rice tables however are imported directly and executed using the maven tool.
ole-rice-db - This is the db module that has the sql files for OLELS specific tables. The rice tables are auto-imported and the following maven commands would accomplish that for us;
No Format mvn clean install -Pdb,mysql
OLEDOCSTORE - Apache Jackrabbit is the underlying content management framework and so the database configuration is taken care by jackrabbit internally when the application is brought up.
...
subsequently for cleaning the database following actions have to be performed
Info |
---|
This is assuming that there is a docstore.home property set which essentially points to the location where all the docstore folders are generated by the jackrabbit framework. |
...
in]
#For Oracle
mvn initialize -Pdb,oracle -Djdbc.username=OLE -Doracle.dba.url=jdbc:oracle:thin:system/manager@localhost:1521:XE
cd ole-docstore
# For MySQL
mvn initialize -Pdb -Djdbc.dba.username=[fill me] -Djdbc.dba.password=[fill me]
#For Oracle
mvn initialize -Pdb,oracle -Djdbc.username=OLE -Doracle.dba.url=jdbc:oracle:thin:system/manager@localhost:1521:XE |