Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating host to build databases and users with the db_type id prefix

  • Loading branch information...
commit 6e46866824bcd7ce9f4c9031f144ff1e0bf0277b 1 parent 667e058
@jakefeasel authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 models/Host.cfc
View
20 models/Host.cfc
@@ -10,11 +10,11 @@
<cfargument name="databaseName" type="string">
<cfargument name="firstAttempt" type="boolean" default="true">
- <cfset var sql = Replace(this.db_type.setup_script_template, '##databaseName##', databaseName, 'ALL')>
- <cfset var statement = "">
+ <cfset var sql = Replace(this.db_type.setup_script_template, '##databaseName##', this.db_type_id & '_' & databaseName, 'ALL')>
+ <cfset var statement = "">
<cfif Len(this.db_type.batch_separator)>
- <cfset sql = REReplace(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfset sql = REReplace(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
</cfif>
<cftry>
@@ -39,9 +39,9 @@
adminPassword=get('CFAdminPassword'),
name="#this.db_type_id#_#arguments.databaseName#",
class=this.db_type.jdbc_class_name,
- jdbcurl="#Replace(this.jdbc_url_template, '##databaseName##', "db_" & arguments.databaseName, 'ALL')#",
- username="user_#arguments.databaseName#",
- password=arguments.databaseName,
+ jdbcurl="#Replace(this.jdbc_url_template, '##databaseName##', "db_" & this.db_type_id & '_' & arguments.databaseName, 'ALL')#",
+ username="user_#this.db_type_id#_#arguments.databaseName#",
+ password=this.db_type_id & '_' & arguments.databaseName,
customJDBCArguments=this.db_type.custom_jdbc_attributes,
timeout=0,
allowed_grant=false,
@@ -86,9 +86,9 @@
adminPassword=get('CFAdminPassword'),
name="#this.db_type_id#_#arguments.datasourceName#",
class=this.db_type.jdbc_class_name,
- jdbcurl="#Replace(this.jdbc_url_template, '##databaseName##', "db_" & arguments.datasourceName, 'ALL')#",
- username="user_#arguments.datasourceName#",
- password=arguments.datasourceName,
+ jdbcurl="#Replace(this.jdbc_url_template, '##databaseName##', "db_" & this.db_type_id & '_' & arguments.datasourceName, 'ALL')#",
+ username="user_#this.db_type_id#_#arguments.datasourceName#",
+ password=this.db_type_id & '_' & arguments.datasourceName,
customJDBCArguments=this.db_type.custom_jdbc_attributes,
timeout=0,
allowed_select=true,
@@ -127,7 +127,7 @@
<cfif not IsDefined("this.db_type")>
<cfset this.db_type = model("DB_Type").findByKey(this.db_type_id)>
</cfif>
- <cfset var sql = Replace(this.db_type.drop_script_template, '##databaseName##', ucase(databaseName), 'ALL')>
+ <cfset var sql = Replace(this.db_type.drop_script_template, '##databaseName##', this.db_type_id & '_' & ucase(databaseName), 'ALL')>
<cfif Len(this.db_type.batch_separator)>
<cfset sql = REReplace(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
Please sign in to comment.
Something went wrong with that request. Please try again.