您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

31 行
764B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. /**
  5. * Class m210920_074742_add_fields_bread_box
  6. */
  7. class m210920_074742_add_fields_bread_box extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->addColumn('point_sale', 'maximum_number_orders', Schema::TYPE_INTEGER);
  15. $this->addColumn('point_sale', 'is_bread_box', Schema::TYPE_BOOLEAN.' DEFAULT 0');
  16. $this->addColumn('point_sale', 'bread_box_code', Schema::TYPE_STRING);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. $this->dropColumn('point_sale', 'maximum_number_orders');
  24. $this->dropColumn('point_sale', 'is_bread_box');
  25. $this->dropColumn('point_sale', 'bread_box_code');
  26. }
  27. }