<?php use yii\db\Migration; use yii\db\Schema; /** * Class m210920_074742_add_fields_bread_box */ class m210920_074742_add_fields_bread_box extends Migration { /** * {@inheritdoc} */ public function safeUp() { $this->addColumn('point_sale', 'maximum_number_orders', Schema::TYPE_INTEGER); $this->addColumn('point_sale', 'is_bread_box', Schema::TYPE_BOOLEAN.' DEFAULT 0'); $this->addColumn('point_sale', 'bread_box_code', Schema::TYPE_STRING); } /** * {@inheritdoc} */ public function safeDown() { $this->dropColumn('point_sale', 'maximum_number_orders'); $this->dropColumn('point_sale', 'is_bread_box'); $this->dropColumn('point_sale', 'bread_box_code'); } }