Skip to content

Building Database Scripts for OWF

Stephanie Schneider edited this page Oct 19, 2015 · 2 revisions

Building the Database Scripts

Requirements

  1. The database of your choice (currently supports Oracle, PostgreSQL, MySQL, SQLServer)
  2. Ant
  3. Grails

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

  1. Install require software and clone repository
  2. 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 and mysql for MySQL e.g.) and also the development block. Use the examples in DataSource.groovy as a guideline.
  1. Clean the database either by dropping all tables manually or running the grails command to drop all tables
  2. Run the generation script for whichever database you're working with
  3. 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

Clone this wiki locally