grails - Drop and create database in BootStrap -


i want know if there way drop , create database manually. want execute code in init method of bootstrap.groovy.

i aware can set datasource create-drop mode achieve when application starts still want have sort of manual way this.

edit:

what want clear database , reload dummy data while app running.

you can have dbmanager script hold manually customizing code.

use below code bootstrap.groovy file call script. runs based on environment.

def dbmanager =("grails -dgrails.env="+environment.currentenvironment+" run-script scripts/dbmanager.groovy").execute() dbmanager.waitforprocessoutput( system.out, system.err ) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -