|
123456789101112131415161718192021222324252627 |
- <?php
-
- use yii\db\Migration;
- use yii\db\Schema;
-
- /**
- * Class m230904_064216_add_column_user_producer_newsletter
- */
- class m230904_064216_add_column_user_producer_newsletter extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->addColumn('user_producer', 'newsletter', Schema::TYPE_BOOLEAN);
- $this->execute('UPDATE user_producer SET newsletter = 1;');
- }
-
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropColumn('user_producer', 'newsletter');
- }
- }
|