mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-25 04:07:17 +08:00
* Merge remote-tracking branch 'gitee/xiaochong0302/I280IZ' into xiaocho… * 初步完成开放登录,待线上测试7 * Merge branch 'demo' of gitee.com:koogua/course-tencent-cloud into xiao… * 初步完成开放登录,待线上测试6 * !30 开放登录线上测试5 * !29 开放登录线上测试5 * 初步完成开放登录,待线上测试5 * !28 开放登录线上测试4 * 初步完成开放登录,待线上测试4 * !27 开放登录线上测试3 * 初步完成开放登录,待线上测试3 * !26 开放登录线上测试2 * 初步完成开放登录,待线上测试2 * !25 开放登录线上测试 * 初步完成开放登录,待线上测试 * !22 验证更新h5支付 * Merge remote-tracking branch 'remotes/gitee/develop' into demo * !20 验证更新h5支付 * Merge branch 'develop' of https://gitee.com/koogua/course-tencent-clou… * !16 v1.2.0阶段性合并 * 删除调试断点代码 * 删除重复的signature方法 * Merge branch 'develop' of https://gitee.com/koogua/course-tencent-clou… * demo后台增加统计 * !5 更新版本号1.1.0 * !4 v1.1.0版本develop->demo * Merge branch 'develop' into demo * 1.增加changelog.md * Merge branch 'develop' into demo * Merge branch 'develop' into demo * Merge branch 'develop' into demo * !1 精简优化代码 * Merge branch 'develop' into demo * 合并修改
93 lines
3.1 KiB
PHP
93 lines
3.1 KiB
PHP
<?php
|
|
|
|
use Phinx\Db\Adapter\MysqlAdapter;
|
|
|
|
class CreateConnectTable extends Phinx\Migration\AbstractMigration
|
|
{
|
|
public function change()
|
|
{
|
|
$this->table('kg_connect', [
|
|
'id' => false,
|
|
'primary_key' => ['id'],
|
|
'engine' => 'InnoDB',
|
|
'encoding' => 'utf8mb4',
|
|
'collation' => 'utf8mb4_general_ci',
|
|
'comment' => '',
|
|
'row_format' => 'DYNAMIC',
|
|
])
|
|
->addColumn('id', 'integer', [
|
|
'null' => false,
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'identity' => 'enable',
|
|
'comment' => '主键编号',
|
|
])
|
|
->addColumn('user_id', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'comment' => '用户编号',
|
|
'after' => 'id',
|
|
])
|
|
->addColumn('open_id', 'string', [
|
|
'null' => false,
|
|
'default' => '',
|
|
'limit' => 50,
|
|
'collation' => 'utf8mb4_general_ci',
|
|
'encoding' => 'utf8mb4',
|
|
'comment' => '开放ID',
|
|
'after' => 'user_id',
|
|
])
|
|
->addColumn('open_name', 'string', [
|
|
'null' => false,
|
|
'default' => '',
|
|
'limit' => 30,
|
|
'collation' => 'utf8mb4_general_ci',
|
|
'encoding' => 'utf8mb4',
|
|
'comment' => '开放名称',
|
|
'after' => 'open_id',
|
|
])
|
|
->addColumn('open_avatar', 'string', [
|
|
'null' => false,
|
|
'default' => '',
|
|
'limit' => 150,
|
|
'collation' => 'utf8mb4_general_ci',
|
|
'encoding' => 'utf8mb4',
|
|
'comment' => '开放头像',
|
|
'after' => 'open_name',
|
|
])
|
|
->addColumn('provider', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'comment' => '提供方',
|
|
'after' => 'open_avatar',
|
|
])
|
|
->addColumn('deleted', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'comment' => '删除标识',
|
|
'after' => 'provider',
|
|
])
|
|
->addColumn('create_time', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'comment' => '创建时间',
|
|
'after' => 'deleted',
|
|
])
|
|
->addColumn('update_time', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'comment' => '更新时间',
|
|
'after' => 'create_time',
|
|
])
|
|
->addIndex(['open_id', 'provider'], [
|
|
'name' => 'openid_provider',
|
|
'unique' => false,
|
|
])
|
|
->create();
|
|
}
|
|
}
|