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.

31 lines
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. }