Skip to content

Commit

Permalink
Fixed issue #9791: Upgrade from 2.05+ breaks on Linux/MSSQL systems
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jul 24, 2015
1 parent e0880dc commit 0306baf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -1395,8 +1395,15 @@ function upgradeTokenTables179()
{
$oDB = Yii::app()->db;
$oSchema = Yii::app()->db->schema;
if(Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='mysql') $sSubstringCommand='substring'; else $sSubstringCommand='substr';

switch (Yii::app()->db->driverName){
case 'sqlsrv':
case 'dblib':
case 'mssql':
$sSubstringCommand='substring';
break;
default:
$sSubstringCommand='substr';
}
$surveyidresult = dbGetTablesLike("tokens%");
if ($surveyidresult)
{
Expand Down

0 comments on commit 0306baf

Please sign in to comment.