<?php use yii\db\Migration; use yii\db\Schema; /** * Class m230112_094203_producer_add_options_billing */ class m230112_094203_producer_add_options_billing extends Migration { /** * {@inheritdoc} */ public function safeUp() { $this->addColumn('producer', 'option_billing_reduction_percentage', Schema::TYPE_INTEGER .' DEFAULT NULL'); $this->addColumn('producer', 'option_billing_permanent_transfer', Schema::TYPE_BOOLEAN . ' DEFAULT 0'); $this->addColumn('producer', 'option_billing_permanent_transfer_amount', Schema::TYPE_INTEGER .' DEFAULT NULL'); } /** * {@inheritdoc} */ public function safeDown() { $this->dropColumn('producer', 'option_billing_reduction_percentage'); $this->dropColumn('producer', 'option_billing_permanent_transfer'); $this->dropColumn('producer', 'option_billing_permanent_transfer_amount'); } }