| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace addons\ReservationService\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241011023444AlterQimallAddonsReservationServiceUser
- */
- class M241011023444AlterQimallAddonsReservationServiceUser extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "
- alter table qimall_addons_reservation_service_user add `store_service_rating` decimal(3,2) NOT NULL DEFAULT '0' COMMENT '门店技师服务评分';
- ALTER TABLE qimall_addons_reservation_service_user ALTER COLUMN service_rating SET DEFAULT 0;
- alter table qimall_addons_reservation_service_user add `province` varchar(255) NOT NULL DEFAULT '' COMMENT '省';
- alter table qimall_addons_reservation_service_user add `city` varchar(255) NOT NULL DEFAULT '' COMMENT '市';
- alter table qimall_addons_reservation_service_user add `district` varchar(255) NOT NULL DEFAULT '' COMMENT '区';
- alter table qimall_addons_reservation_service_order add `reject_reason` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由';
- ";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241011023444AlterQimallAddonsReservationServiceUser cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241011023444AlterQimallAddonsReservationServiceUser cannot be reverted.\n";
- return false;
- }
- */
- }
|