| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240827033941CreatebackendDeductqimallGlobalVarMap
- */
- class M240827033941CreatebackendDeductqimallGlobalVarMap extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("INSERT INTO `qimall_global_var_map` (`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('backend_deduct', '后台扣减', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);");
- $this->execute("ALTER TABLE `qimall_goods`
- ADD COLUMN `can_feedback` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '是否可以申请售后';");
- $this->execute("ALTER TABLE `qimall_order_refund`
- ADD COLUMN `num` INT(10) NOT NULL DEFAULT '0' COMMENT '售后数量';");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240827033941CreatebackendDeductqimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240827033941CreatebackendDeductqimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- */
- }
|