Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

m210920_074742_add_fields_bread_box.php 764B

123456789101112131415161718192021222324252627282930
  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. }