M240304071046QimallAddonsReservationServiceOrder.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace addons\ReservationService\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240304071046QimallAddonsReservationServiceOrder
  6. */
  7. class M240304071046QimallAddonsReservationServiceOrder extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->execute(" alter table qimall_addons_reservation_service_order add secondary_card_id int(11) not null default 0 comment '次卡id';");
  15. $this->execute(" alter table qimall_addons_reservation_service_order add secondary_card_no varchar(255) not null default '' comment '次卡号';");
  16. $this->execute(" alter table qimall_addons_reservation_service_order add reservation_model tinyint(1) NOT NULL DEFAULT '0' COMMENT '预约模式:1:预约门店;2:预约服务人';");
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. echo "M240304071046QimallAddonsReservationServiceOrder cannot be reverted.\n";
  24. return false;
  25. }
  26. /*
  27. // Use up()/down() to run migration code without a transaction.
  28. public function up()
  29. {
  30. }
  31. public function down()
  32. {
  33. echo "M240304071046QimallAddonsReservationServiceOrder cannot be reverted.\n";
  34. return false;
  35. }
  36. */
  37. }