portal.mkgtu.ru/common/migrations/db/m210625_001351_change_table...

28 lines
467 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m210625_001351_change_table_charset extends MigrationWithDefaultOptions
{
public function safeUp()
{
if (\Yii::$app->db->driverName === 'mysql') {
$this->execute(" ALTER TABLE admission_agreement_to_delete CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;");
}
}
public function safeDown()
{
return true;
}
}