Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #CR-1392: SQL not compatible with MSSQL and Postgres (#3700)
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace LimeSurvey\Helpers\Update; | ||
|
||
use LimeSurvey\Helpers\Update\DatabaseUpdateBase; | ||
|
||
class Update_621 extends DatabaseUpdateBase | ||
{ | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function up() | ||
{ | ||
$table = \Yii::app()->db->schema->getTable('{{users}}'); | ||
if (isset($table->columns['user_status']) && $table->columns['user_status']->dbType != 'integer') { | ||
\alterColumn('{{users}}', 'user_status', "integer", false, 1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters