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.groovyfile in the project
- You'll need to change the blocks corresponding to your database (
mysql_emptyandmysqlfor MySQL e.g.) and also thedevelopmentblock. Use the examples inDataSource.groovyas 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 bundleto 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