You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 line
693B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. class m210330_072516_add_option_delivery extends Migration
  5. {
  6. public function safeUp()
  7. {
  8. $this->addColumn('producer', 'option_delivery', Schema::TYPE_BOOLEAN. ' DEFAULT 0');
  9. $this->addColumn('order', 'delivery_home', Schema::TYPE_BOOLEAN.' DEFAULT 0');
  10. $this->addColumn('order', 'delivery_address', Schema::TYPE_TEXT);
  11. }
  12. public function safeDown()
  13. {
  14. $this->dropColumn('producer', 'option_delivery');
  15. $this->dropColumn('order', 'delivery_home');
  16. $this->dropColumn('order', 'delivery_address');
  17. }
  18. }