...
- Make changes to your local database during development. The changes should follow the standards listed above.
- Create alter scripts (in Oracle & MySQL DDL) in the appropriate directory for the version you are working on.
All SQL database changes go in a subfolder of
db/sql/src/main/resources/org/kuali/rice/rice-sql/upgrades/<x.x.x>
- Oracle changes go in the subfolder
oracle
and MySQL changes go in the subfoldermysql
. - Client-side changes should be put in the subfolder
client
while the rest of the changes should go intoserver
. There is no need to duplicate scripts between client and server side, the client scripts are applied to the server database automatically (in other words the server schema and dataset is a superset of the client). - Scripts should be further split between
bootstrap
,demo
, andtest
.- If the change is needed by all Rice users to use the system, put it in
bootstrap.
- If the change is just needed by Rice developers to test something in the system, put it in
demo.
- If the change is needed by all the unit tests, put it in
test
.
- If the change is needed by all Rice users to use the system, put it in
- Scripts should be named with the year, month and day and the JIRA number as such:
yyyy-mm-dd--KULRICE-0000.sql
. - Both types of scripts should use the
/
delimiter (as previously only used in Oracle).
- Create XML ingestion scripts in the appropriate directory for the version you are working on.
- All XML database changes go in a subfolder of
db/xml/src/main/resources/org/kuali/rice/rice-xml/upgrades/<x.x.x>
- Scripts should be further split between
bootstrap
,demo
, andtest
.- If the change is needed by all Rice users to use the system, put it in
bootstrap.
- If the change is just needed by Rice developers to test something in the system, put it in
demo.
- If the change is needed by all the unit tests, put it in
test
.
- If the change is needed by all Rice users to use the system, put it in
- Scripts should be named with the same value as the XML document
<name>
If there is a parent/child relationship, then the child document should go into a folder named after the parent document so that it is ingested after its parent. This structure can be as deep as needed.
No Format demo |-- ParentDocument.xml |-- ParentDocument |-- ChildDocument.xml
- All XML database changes go in a subfolder of
- Prior to committing any SQL changes reset your local database using the same process CI will use once the SQL has been committed
From the root of a local checkout of the Rice project
No Format cd db/sql mvn clean install mvn initialize -Pdb,local <-- This runs against MySQL mvn initialize -Pdb,local,oracle <-- This runs against Oracle
The MySQL process connects as “root” (no password) to “ jdbc:mysql://localhost”
(you can override the these by adding -D parameters/values for mysql.dba.username, mysql.dba.password & mysql.dba.url)
The Oracle process connects as “system/manager” to “ jdbc:oracle:thin:@localhost:1521:XE”
(you can override the these by adding -D parameters/values for oracle.dba.username, oracle.dba.password & oracle.dba.url)
- Examine your local database to ensure the changes have been picked up correctly
- Perform unit testing / smoke testing of the application as appropriate
- Prior to committing any XML changes ingest your documents to make sure they work
- Commit your changes.
- Start the CI process
rice-<x.x.x>-db-install to produce the export
.- If it goes red, there is probably a problem with your script. Check the output and either try to repair it yourself or ask your DM for help.
- If it finishes green, then your export is ready to be reviewed on the master-db-install branch of the kuali-devops/rice repository.
- Double check that the changes you made are correct in the export (see master-db-install branch. Checkout the branch and run impex locally to build the rice database. (Note that the job changes the OBJ_ID value. That's ok).
- Create pull request to merge the master-db-install branch changes into the code base. Delete the master-db-install branch after the merger.
...