| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240323090829StoreHuifuPayShareAmount
- */
- class M240323090829StoreHuifuPayShareAmount extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("ALTER TABLE `qimall_addons_store_settings`
- ADD COLUMN `huifu_mch_no` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '汇付商户号';");
- $this->execute("ALTER TABLE `qimall_addons_store`
- ADD COLUMN `share_amount` DECIMAL(12,2) NOT NULL DEFAULT '0.00' COMMENT '已分账金额';");
- $this->execute("INSERT INTO `qimall_addons_store_addons` (`title`, `name`, `cover`, `brief_introduction`, `status`, `created_at`, `updated_at`) VALUES ('汇付记录', 'HuifuPay', '', '汇付支付分账记录', 1, 1702975895, 1702975895);");
- $this->execute("INSERT INTO `qimall_addons_store_menu` (`id`, `title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`, `addons_name`, `is_addon`) VALUES (123, '支付记录', '0', 122, 'store/huifu-pay/index/index', '', 2, 0, 999, NULL, '', 1, 0, 0, 'HuifuPay', 1);");
- $this->execute("INSERT INTO `qimall_addons_store_menu` (`id`, `title`, `app_id`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`, `addons_name`, `is_addon`) VALUES (122, '支付记录', '0', 0, 'store/huifu-pay/index/index', '', 2, 0, 999, NULL, '', 1, 0, 0, 'HuifuPay', 1);");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240323090829StoreHuifuPayShareAmount cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240323090829StoreHuifuPayShareAmount cannot be reverted.\n";
- return false;
- }
- */
- }
|