| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230918020037BalanceRecharge
- */
- class M230918020037BalanceRecharge extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "INSERT INTO `qimall_menu` (`title`, `app_id`, `cate_id`, `addons_name`, `is_addon`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ('充值审核', 'backend', '2', '', '0', '35', 'mall/finance/recharge-audit', '', '2', '1', '999', NULL, 'tr_0 tr_35', '1', '1694766835', '1694766835');";
- $this->execute($sql);
- $sql = "CREATE TABLE `qimall_balance_recharge_log` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '充值金额',
- `withdraw_status` int(11) NOT NULL DEFAULT '0' COMMENT '申请状态 0--申请 1--同意 2--驳回',
- `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
- `payment_evidence` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付凭证',
- `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态[0禁用 1启用 -1删除]',
- `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间戳',
- `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间戳',
- PRIMARY KEY (`id`),
- KEY `index_mall_id` (`mall_id`) USING BTREE,
- KEY `index_user_id` (`user_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230918020037BalanceRecharge cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230918020037BalanceRecharge cannot be reverted.\n";
- return false;
- }
- */
- }
|