M241011035241AlterQimallOrderReserveComments.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M241011035241AlterQimallOrderReserveComments
  6. */
  7. class M241011035241AlterQimallOrderReserveComments extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = "
  15. alter table qimall_order_reserve_comments add `staff_score` tinyint(3) NOT NULL DEFAULT '0' COMMENT '技师评分';
  16. alter table qimall_order_reserve_comments add `environment_score` tinyint(3) NOT NULL DEFAULT '0' COMMENT '环境评分';
  17. alter table qimall_order_reserve_comments add `service_score` tinyint(3) NOT NULL DEFAULT '0' COMMENT '服务评分';
  18. alter table qimall_order_reserve_comments add `show_tech` tinyint(1) NOT NULL DEFAULT '0' COMMENT '门店预约商品:是否显示技师信息1:是;0否';
  19. ";
  20. $this->execute($sql);
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function safeDown()
  26. {
  27. echo "M241011035241AlterQimallOrderReserveComments cannot be reverted.\n";
  28. return false;
  29. }
  30. /*
  31. // Use up()/down() to run migration code without a transaction.
  32. public function up()
  33. {
  34. }
  35. public function down()
  36. {
  37. echo "M241011035241AlterQimallOrderReserveComments cannot be reverted.\n";
  38. return false;
  39. }
  40. */
  41. }