| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace addons\RealAuth\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230322023449RealAuthTaodonglai
- */
- class M230322023449RealAuthTaodonglai extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_real_auth_user` ADD COLUMN `auth_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '实名认证类型:0未知,1 个人 2 企业';";
- $sql .= "ALTER TABLE `qimall_addons_real_auth_user` ADD COLUMN `business_code` varchar(100) NOT NULL DEFAULT '' COMMENT '营业执照号码';";
- $sql .= "CREATE TABLE `qimall_addons_real_auth_detail` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) unsigned NOT NULL DEFAULT '0',
- `auth_id` int(11) NOT NULL DEFAULT '0' COMMENT '实名认证id',
- `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
- `auth_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '实名认证类型:0未知,1 个人 2 企业',
- `created_at` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间戳',
- `updated_at` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间戳',
- `detail` json NOT NULL COMMENT '实名认证资料,json格式',
- `status` tinyint(4) DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `check_at` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '审核时间戳',
- `check_status` tinyint(4) DEFAULT '0' COMMENT '审核状态[0:未审核;1:通过;2拒绝]',
- `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230322023449RealAuthTaodonglai cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230322023449RealAuthTaodonglai cannot be reverted.\n";
- return false;
- }
- */
- }
|