Skip to content

Commit

Permalink
Fixed issue #19396: Upgrade failure encountered at migration 620 (#3724)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohabmes committed Feb 6, 2024
1 parent 08fc9df commit 0022905
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions application/helpers/update/updates/Update_621.php
Expand Up @@ -11,9 +11,11 @@ class Update_621 extends DatabaseUpdateBase
*/
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);
if (\Yii::app()->db->driverName == 'mysql') {

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Feb 8, 2024

Collaborator

I don't understand ? It('s not for pgsql this update ????

mysql is already a integer(1)

$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);
}
}
}
}

0 comments on commit 0022905

Please sign in to comment.