Skip to content

Commit

Permalink
Fixed issue #13644: Error when activating database sessions and using…
Browse files Browse the repository at this point in the history
… MSSQL
  • Loading branch information
c-schmitz committed Jun 26, 2018
1 parent 3b1abdc commit e40c9ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -13,7 +13,7 @@


$config['versionnumber'] = '3.12.2';
$config['dbversionnumber'] = 351;
$config['dbversionnumber'] = 352;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['assetsversionnumber'] = '30045';
Expand Down
2 changes: 2 additions & 0 deletions application/core/db/MssqlSchema.php
Expand Up @@ -23,6 +23,8 @@ public function __construct($conn)
$this->columnTypes['autoincrement'] = 'integer NOT NULL IDENTITY (1,1)';

$this->columnTypes['longbinary'] = 'varbinary(max)';

$this->columnTypes['binary'] = 'varbinary(max)';
}


Expand Down
8 changes: 8 additions & 0 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -2241,6 +2241,14 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
$oTransaction->commit();
}

if ($iOldDBVersion < 352) {
$oTransaction = $oDB->beginTransaction();
dropColumn('{{sessions}}','data');
addColumn('{{sessions}}','data','binary');
$oTransaction->commit();
}



} catch (Exception $e) {
Yii::app()->setConfig('Updating', false);
Expand Down

0 comments on commit e40c9ef

Please sign in to comment.