|
@@ -47,7 +47,7 @@ final class InitDatabase extends AbstractMigration
|
|
|
->addColumn('ga_token', 'string', [ ])
|
|
|
->addIndex([ 'ga_token' ], [ 'unique' => true ])
|
|
|
->addColumn('ga_enable', 'integer', [ 'default' => '0' ])
|
|
|
- ->addColumn('remark', 'string', [ 'comment' => '备注', 'default' => '' ])
|
|
|
+ ->addColumn('remark', 'text', [ 'comment' => '备注', 'default' => '' ])
|
|
|
->addColumn('node_group', 'integer', [ 'comment' => '节点分组', 'default' => 0 ])
|
|
|
->addColumn('protocol', 'string', [ 'comment' => 'SS/SSR协议方式', 'default' => 'origin' ])
|
|
|
->addColumn('protocol_param', 'string', [ 'default' => '' ])
|
|
@@ -71,8 +71,8 @@ final class InitDatabase extends AbstractMigration
|
|
|
->addColumn('name', 'string', [])
|
|
|
->addColumn('type', 'integer', [])
|
|
|
->addColumn('server', 'string', [])
|
|
|
- ->addColumn('custom_config', 'string', [])
|
|
|
- ->addColumn('info', 'string', [ 'default' => '' ])
|
|
|
+ ->addColumn('custom_config', 'json', [ 'comment' => '自定义配置', 'default' => '{}' ])
|
|
|
+ ->addColumn('info', 'text', [ 'default' => '' ])
|
|
|
->addColumn('status', 'string', [ 'default' => '' ])
|
|
|
->addColumn('sort', 'integer', [])
|
|
|
->addColumn('traffic_rate', 'float', [ 'default' => 1 ])
|
|
@@ -104,8 +104,8 @@ final class InitDatabase extends AbstractMigration
|
|
|
$this->table('announcement', [ 'id' => false, 'primary_key' => [ 'id' ]])
|
|
|
->addColumn('id', 'integer', [ 'identity' => true ])
|
|
|
->addColumn('date', 'datetime', [])
|
|
|
- ->addColumn('content', 'string', [])
|
|
|
- ->addColumn('markdown', 'string', [])
|
|
|
+ ->addColumn('content', 'text', [])
|
|
|
+ ->addColumn('markdown', 'text', [])
|
|
|
->create();
|
|
|
|
|
|
$this->table('blockip', [ 'id' => false, 'primary_key' => [ 'id' ]])
|
|
@@ -157,9 +157,9 @@ final class InitDatabase extends AbstractMigration
|
|
|
->create();
|
|
|
|
|
|
$this->table('detect_ban_log', [ 'id' => false, 'primary_key' => [ 'id' ]])
|
|
|
- ->addColumn('id', 'integer', [ 'identity' => true,'signed' => false ])
|
|
|
+ ->addColumn('id', 'integer', [ 'identity' => true, 'signed' => false ])
|
|
|
->addColumn('user_name', 'string', [ 'comment' => '用户名' ])
|
|
|
- ->addColumn('user_id', 'biginteger', [ 'comment' => '用户 ID','signed' => false ])
|
|
|
+ ->addColumn('user_id', 'biginteger', [ 'comment' => '用户 ID', 'signed' => false ])
|
|
|
->addColumn('email', 'string', [ 'comment' => '用户邮箱' ])
|
|
|
->addColumn('detect_number', 'integer', [ 'comment' => '本次违规次数' ])
|
|
|
->addColumn('ban_time', 'integer', [ 'comment' => '本次封禁时长' ])
|
|
@@ -253,7 +253,7 @@ final class InitDatabase extends AbstractMigration
|
|
|
->addColumn('id', 'biginteger', [ 'identity' => true ])
|
|
|
->addColumn('name', 'string', [])
|
|
|
->addColumn('price', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
|
|
|
- ->addColumn('content', 'string', [])
|
|
|
+ ->addColumn('content', 'text', [])
|
|
|
->addColumn('auto_renew', 'integer', [])
|
|
|
->addColumn('auto_reset_bandwidth', 'integer', [ 'default' => 0 ])
|
|
|
->addColumn('status', 'integer', [ 'default' => 1 ])
|
|
@@ -298,7 +298,7 @@ final class InitDatabase extends AbstractMigration
|
|
|
$this->table('ticket', [ 'id' => false, 'primary_key' => [ 'id' ]])
|
|
|
->addColumn('id', 'biginteger', [ 'identity' => true ])
|
|
|
->addColumn('title', 'string', [])
|
|
|
- ->addColumn('content', 'string', [])
|
|
|
+ ->addColumn('content', 'text', [])
|
|
|
->addColumn('rootid', 'biginteger', [])
|
|
|
->addColumn('userid', 'biginteger', [])
|
|
|
->addColumn('datetime', 'biginteger', [])
|
|
@@ -330,7 +330,7 @@ final class InitDatabase extends AbstractMigration
|
|
|
->addColumn('subscribe_type', 'string', [ 'comment' => '获取的订阅类型' ])
|
|
|
->addColumn('request_ip', 'string', [ 'comment' => '请求 IP' ])
|
|
|
->addColumn('request_time', 'datetime', [ 'comment' => '请求时间' ])
|
|
|
- ->addColumn('request_user_agent', 'string', [ 'comment' => '请求 UA 信息','default' => null ])
|
|
|
+ ->addColumn('request_user_agent', 'text', [ 'comment' => '请求 UA 信息','default' => null ])
|
|
|
->addIndex([ 'user_id' ])
|
|
|
->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
|
|
|
->create();
|