Building Database Scripts for OWF - ozoneplatform/owf-framework GitHub Wiki
Building the Database Scripts
Requirements
You'll need the version of Grails that corresponds with the OWF version you're working with. See the table in the Build Instructions.
Steps
- Install require software and clone repository
- With a server running your choice database update the
DataSource.groovy
file in the project
- You'll need to change the blocks corresponding to your database (
mysql_empty
andmysql
for MySQL e.g.) and also thedevelopment
block. Use the examples inDataSource.groovy
as a guideline.
- Clean the database either by dropping all tables manually or running the grails command to drop all tables
- Run the generation script for whichever database you're working with
- Commit the new files or run
ant bundle
to have them added to a bundle
Command Line
Cleaning the database:
grails dbm-drop-all
Generate database scripts:
ant generateOracleDatabaseScripts
-> Oracle
ant generatePostgresqlDatabaseScripts
-> PostgreSQL
ant generateMySQLDatabaseScripts
-> MySQL
ant generateSQLServerDatabaseScripts
-> SQLServer
Notes
Database scripts are located under src/assemble/dbscripts
once they're generated