fix ./gradlew createDB / dropDB / setBlankPassword
This commit is contained in:
@@ -400,17 +400,17 @@ configurations.driver.each {File file ->
|
|||||||
|
|
||||||
task createDB<<{
|
task createDB<<{
|
||||||
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
|
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
|
||||||
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||||
sql.execute( 'create database '+"`$dbName`" )
|
sql.execute( 'create database '+"`$dbName`" )
|
||||||
}
|
}
|
||||||
|
|
||||||
task dropDB<<{
|
task dropDB<<{
|
||||||
description= "Drops the specified database. The database name has to be passed (like: -PdbName=someDBname)"
|
description= "Drops the specified database. The database name has to be passed (like: -PdbName=someDBname)"
|
||||||
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||||
sql.execute( 'DROP DATABASE '+"`$dbName`")
|
sql.execute( 'DROP DATABASE '+"`$dbName`")
|
||||||
}
|
}
|
||||||
task setBlankPassword<<{
|
task setBlankPassword<<{
|
||||||
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||||
sql.execute('USE `mifosplatform-tenants`')
|
sql.execute('USE `mifosplatform-tenants`')
|
||||||
sql.execute('UPDATE mifosplatform-tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
|
sql.execute('UPDATE mifosplatform-tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user