| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230526085144QimallWithdrawsLimitLog
- */
- class M230529085144QimallWithdrawsLimitLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "CREATE TABLE `qimall_withdraws_limit_change_log` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '消费者ID',
- `amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '变动额度,单位:元',
- `withdraw_log_id` int(10) NOT NULL DEFAULT '0' COMMENT '提现id',
- `from` tinyint(1) NOT NULL DEFAULT '1' COMMENT '提现来源1佣金2余额',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `user_id+serve_uid` (`user_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户提现金额限制变动表';";
- $this->execute($sql);
- $sql = "CREATE TABLE `qimall_withdraws_limit_log` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '消费者ID',
- `amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '提现额度,单位:元',
- `from` tinyint(1) NOT NULL DEFAULT '1' COMMENT '提现来源1佣金2余额',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `user_id+serve_uid` (`user_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户提现金额限制表';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230526085144QimallWithdrawsLimitLog cannot be reverted.\n";
- return false;
- }
- */
- }
|