20000101000000_init_database.php.new 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <?php
  2. declare(strict_types=1);
  3. use Phinx\Db\Adapter\MysqlAdapter;
  4. use Phinx\Migration\AbstractMigration;
  5. final class InitDatabase extends AbstractMigration
  6. {
  7. public function up(): void
  8. {
  9. $this->table('user', [ 'id' => false, 'primary_key' => [ 'id' ]])
  10. ->addColumn('id', 'biginteger', [ 'comment' => '用户ID', 'identity' => true, 'signed' => false, 'null' => false ])
  11. ->addColumn('user_name', 'string', [ 'comment' => '用户名' ])
  12. ->addColumn('email', 'string', [ 'comment' => 'E-Mail' ])
  13. ->addIndex([ 'email' ], [ 'unique' => true ])
  14. ->addColumn('pass', 'string', [ 'comment' => '登录密码' ])
  15. ->addColumn('passwd', 'string', [ 'comment' => '节点密码' ])
  16. ->addColumn('uuid', 'uuid', [ 'comment' => '用户UUID', 'null' => false ])
  17. ->addIndex([ 'uuid' ], [ 'unique' => true ])
  18. ->addColumn('t', 'biginteger', [ 'comment' => '最后使用时间', 'default' => 0, 'signed' => false])
  19. ->addColumn('u', 'biginteger', [ 'comment' => '账户当前上传流量', 'default' => 0, 'signed' => false])
  20. ->addColumn('d', 'biginteger', [ 'comment' => '账户当前下载流量', 'default' => 0, 'signed' => false])
  21. ->addColumn('transfer_total', 'biginteger', [ 'comment' => '账户累计使用流量', 'default' => 0, 'signed' => false])
  22. ->addColumn('transfer_enable', 'biginteger', [ 'comment' => '账户当前可用流量', 'default' => 0, 'signed' => false ])
  23. ->addColumn('port', 'smallinteger', [ 'comment' => '用户端口', 'null' => false ])
  24. ->addColumn('last_detect_ban_time', 'datetime', [ 'comment' => '最后一次被封禁的时间', 'default' => '1989-06-04 00:05:00' ])
  25. ->addColumn('all_detect_number', 'integer', [ 'comment' => '累计违规次数', 'default' => 0 ])
  26. ->addColumn('last_check_in_time', 'biginteger', [ 'comment' => '最后签到时间', 'default' => 0, 'signed' => false ])
  27. ->addColumn('reg_date', 'datetime', [ 'comment' => '注册时间' ])
  28. ->addColumn('invite_num', 'integer', [ 'comment' => '可用邀请次数', 'default' => 0 ])
  29. ->addColumn('money', 'decimal', [ 'comment' => '钱包余额', 'default' => 0 ])
  30. ->addColumn('ref_by', 'biginteger', [ 'comment' => '邀请人ID', 'default' => '0', 'signed' => false ])
  31. ->addColumn('method', 'string', [ 'comment' => 'SS/SSR加密方式', 'default' => 'rc4-md5' ])
  32. ->addColumn('reg_ip', 'string', [ 'comment' => '注册IP', 'default' => '127.0.0.1' ])
  33. ->addColumn('node_speedlimit', 'double', [ 'comment' => '用户节点限速', 'default' => 0, 'null' => false ])
  34. ->addColumn('node_iplimit', 'smallinteger', [ 'comment' => '同时可连接IP数', 'default' => 0, 'null' => false ])
  35. ->addColumn('node_connector', 'integer', [ 'comment' => '同时可使用连接数', 'default' => 0 ])
  36. ->addColumn('is_admin', 'boolean', [ 'comment' => '是否管理员', 'default' => false ])
  37. ->addColumn('im_type', 'integer', [ 'comment' => '联系方式类型', 'default' => 1 ])
  38. ->addColumn('im_value', 'string', [ 'comment' => '联系方式', 'default' => '' ])
  39. ->addColumn('last_day_t', 'biginteger', [ 'comment' => '今天之前已使用的流量', 'default' => 0 ])
  40. ->addColumn('sendDailyMail', 'boolean', [ 'comment' => '每日报告开关', 'default' => 0 ])
  41. ->addColumn('class', 'integer', [ 'comment' => '用户等级', 'default' => 0, 'signed' => false, 'null' => false ])
  42. ->addColumn('class_expire', 'datetime', [ 'comment' => '等级过期时间', 'default' => '1989-06-04 00:05:00' ])
  43. ->addColumn('expire_in', 'datetime', [ 'default' => '2099-06-04 00:05:00' ])
  44. ->addColumn('theme', 'string', [ 'comment' => '网站主题' ])
  45. ->addColumn('ga_token', 'string', [ ])
  46. ->addIndex([ 'ga_token' ], [ 'unique' => true ])
  47. ->addColumn('ga_enable', 'integer', [ 'default' => '0' ])
  48. ->addColumn('remark', 'text', [ 'comment' => '备注', 'default' => '' ])
  49. ->addColumn('node_group', 'integer', [ 'comment' => '用户等级', 'default' => 0, 'signed' => false, 'null' => false ])
  50. ->addColumn('protocol', 'string', [ 'comment' => 'SS/SSR协议方式', 'default' => 'origin' ])
  51. ->addColumn('protocol_param', 'string', [ 'default' => '' ])
  52. ->addColumn('obfs', 'string', [ 'comment' => 'SS/SSR混淆方式', 'default' => 'plain' ])
  53. ->addColumn('obfs_param', 'string', [ 'default' => '' ])
  54. ->addColumn('is_banned', 'integer', [ 'comment' => '是否封禁', 'default' => 0 ])
  55. ->addColumn('banned_reason', 'string', [ 'comment' => '封禁理由', 'default' => '' ])
  56. ->addColumn('is_multi_user', 'integer', [ 'default' => 0 ])
  57. ->addColumn('telegram_id', 'biginteger', [ 'default' => 0 ])
  58. ->addColumn('expire_notified', 'boolean', [ 'default' => false])
  59. ->addColumn('traffic_notified', 'boolean', [ 'default' => false])
  60. ->addColumn('forbidden_ip', 'string', [ 'default' => '' ])
  61. ->addColumn('forbidden_port', 'string', [ 'default' => '' ])
  62. ->addColumn('auto_reset_day', 'integer', [ 'default' => 0])
  63. ->addColumn('auto_reset_bandwidth', 'decimal', [ 'default' => '0.00', 'precision' => 12, 'scale' => 2 ])
  64. ->addIndex([ 'user_name' ])
  65. ->create();
  66. $this->table('node', [ 'id' => false, 'primary_key' => [ 'id' ]])
  67. ->addColumn('id', 'integer', [ 'identity' => true ])
  68. ->addColumn('name', 'string', [])
  69. ->addColumn('type', 'integer', [])
  70. ->addColumn('server', 'string', [])
  71. ->addColumn('custom_config', 'json', [ 'comment' => '自定义配置', 'default' => '{}' ])
  72. ->addColumn('info', 'text', [ 'default' => '' ])
  73. ->addColumn('status', 'string', [ 'default' => '' ])
  74. ->addColumn('sort', 'integer', [])
  75. ->addColumn('traffic_rate', 'float', [ 'default' => 1 ])
  76. ->addColumn('node_class', 'integer', [ 'default' => 0 ])
  77. ->addColumn('node_speedlimit', 'double', [ 'comment' => '节点限速', 'null' => false ])
  78. ->addColumn('node_connector', 'integer', [ 'default' => 0 ])
  79. ->addColumn('node_bandwidth', 'biginteger', [ 'default' => 0 ])
  80. ->addColumn('node_bandwidth_limit', 'biginteger', [ 'default' => 0 ])
  81. ->addColumn('bandwidthlimit_resetday', 'integer', [ 'default' => 0 ])
  82. ->addColumn('node_heartbeat', 'biginteger', [ 'default' => 0 ])
  83. ->addColumn('node_ip', 'string', [ 'default' => null ])
  84. ->addColumn('node_group', 'integer', [ 'default' => 0 ])
  85. ->addColumn('mu_only', 'boolean', [ 'default' => false ])
  86. ->addColumn('online', 'boolean', [ 'default' => true ])
  87. ->addColumn('gfw_block', 'boolean', [ 'default' => false ])
  88. ->addColumn('password', 'string', [])
  89. ->create();
  90. $this->table('alive_ip', [ 'id' => false, 'primary_key' => [ 'id' ]])
  91. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  92. ->addColumn('nodeid', 'integer', [])
  93. ->addColumn('userid', 'integer', [])
  94. ->addColumn('ip', 'string', [])
  95. ->addColumn('datetime', 'biginteger', [])
  96. ->create();
  97. $this->table('announcement', [ 'id' => false, 'primary_key' => [ 'id' ]])
  98. ->addColumn('id', 'integer', [ 'identity' => true ])
  99. ->addColumn('date', 'datetime', [])
  100. ->addColumn('content', 'text', [])
  101. ->create();
  102. $this->table('bought', [ 'id' => false, 'primary_key' => [ 'id' ]])
  103. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  104. ->addColumn('userid', 'biginteger', [])
  105. ->addColumn('shopid', 'biginteger', [])
  106. ->addColumn('datetime', 'biginteger', [])
  107. ->addColumn('renew', 'biginteger', [])
  108. ->addColumn('coupon', 'string', [])
  109. ->addColumn('price', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  110. ->addColumn('is_notified', 'boolean', [ 'default' => false ])
  111. ->create();
  112. $this->table('code', [ 'id' => false, 'primary_key' => [ 'id' ]])
  113. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  114. ->addColumn('code', 'string', [])
  115. ->addColumn('type', 'integer', [])
  116. ->addColumn('number', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  117. ->addColumn('isused', 'integer', [ 'default' => 0 ])
  118. ->addColumn('userid', 'biginteger', [])
  119. ->addColumn('usedatetime', 'datetime', [])
  120. ->create();
  121. $this->table('config', [ 'id' => false, 'primary_key' => [ 'id' ]])
  122. ->addColumn('id', 'integer', [ 'comment' => '主键','identity' => true ])
  123. ->addColumn('item', 'string', [ 'comment' => '项' ])
  124. ->addColumn('value', 'string', [ 'comment' => '值' ])
  125. ->addColumn('class', 'string', [ 'comment' => '配置分类','default' => 'default' ])
  126. ->addColumn('is_public', 'integer', [ 'comment' => '是否为公共参数','default' => 0 ])
  127. ->addColumn('type', 'string', [ 'comment' => '值类型' ])
  128. ->addColumn('default', 'string', [ 'comment' => '默认值' ])
  129. ->addColumn('mark', 'string', [ 'comment' => '备注' ])
  130. ->create();
  131. $this->table('coupon', [ 'id' => false, 'primary_key' => [ 'id' ]])
  132. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  133. ->addColumn('code', 'string', [])
  134. ->addColumn('onetime', 'integer', [])
  135. ->addColumn('expire', 'biginteger', [])
  136. ->addColumn('shop', 'string', [])
  137. ->addColumn('credit', 'integer', [])
  138. ->create();
  139. $this->table('detect_ban_log', [ 'id' => false, 'primary_key' => [ 'id' ]])
  140. ->addColumn('id', 'integer', [ 'identity' => true, 'signed' => false ])
  141. ->addColumn('user_name', 'string', [ 'comment' => '用户名' ])
  142. ->addColumn('user_id', 'biginteger', [ 'comment' => '用户 ID', 'signed' => false ])
  143. ->addColumn('email', 'string', [ 'comment' => '用户邮箱' ])
  144. ->addColumn('detect_number', 'integer', [ 'comment' => '本次违规次数' ])
  145. ->addColumn('ban_time', 'integer', [ 'comment' => '本次封禁时长' ])
  146. ->addColumn('start_time', 'biginteger', [ 'comment' => '统计开始时间' ])
  147. ->addColumn('end_time', 'biginteger', [ 'comment' => '统计结束时间' ])
  148. ->addColumn('all_detect_number', 'integer', [ 'comment' => '累计违规次数' ])
  149. ->addIndex([ 'user_id' ])
  150. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  151. ->create();
  152. $this->table('detect_list', [ 'id' => false, 'primary_key' => [ 'id' ]])
  153. ->addColumn('id', 'biginteger', [ 'identity' => true,'signed' => false ])
  154. ->addColumn('name', 'string', [])
  155. ->addColumn('text', 'string', [])
  156. ->addColumn('regex', 'string', [])
  157. ->addColumn('type', 'integer', [])
  158. ->create();
  159. $this->table('detect_log', [ 'id' => false, 'primary_key' => [ 'id' ]])
  160. ->addColumn('id', 'biginteger', [ 'identity' => true,'signed' => false ])
  161. ->addColumn('user_id', 'biginteger', [ 'signed' => false ])
  162. ->addColumn('list_id', 'biginteger', [ 'signed' => false ])
  163. ->addColumn('datetime', 'biginteger', [ 'signed' => false ])
  164. ->addColumn('node_id', 'integer', [])
  165. ->addColumn('status', 'integer', [ 'default' => 0 ])
  166. ->addIndex([ 'user_id' ])
  167. ->addIndex([ 'node_id' ])
  168. ->addIndex([ 'list_id' ])
  169. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  170. ->addForeignKey('node_id', 'node', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  171. ->addForeignKey('list_id', 'detect_list', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  172. ->create();
  173. $this->table('email_queue', [ 'id' => false, 'primary_key' => [ 'id' ]])
  174. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  175. ->addColumn('to_email', 'string', [])
  176. ->addColumn('subject', 'string', [])
  177. ->addColumn('template', 'string', [])
  178. ->addColumn('array', 'text', ['limit' => MysqlAdapter::TEXT_LONG])
  179. ->addColumn('time', 'integer', [])
  180. ->create();
  181. $this->table('email_verify', [ 'id' => false, 'primary_key' => [ 'id' ]])
  182. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  183. ->addColumn('email', 'string', [])
  184. ->addColumn('ip', 'string', [])
  185. ->addColumn('code', 'string', [])
  186. ->addColumn('expire_in', 'biginteger', [])
  187. ->create();
  188. $this->table('link', [ 'id' => false, 'primary_key' => [ 'id' ]])
  189. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  190. ->addColumn('token', 'string', [ ])
  191. ->addIndex([ 'token' ], [ 'unique' => true ])
  192. ->addColumn('userid', 'biginteger', [ 'signed' => false ])
  193. ->addIndex([ 'userid' ], [ 'unique' => true ])
  194. ->addForeignKey('userid', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  195. ->create();
  196. $this->table('login_ip', [ 'id' => false, 'primary_key' => [ 'id' ]])
  197. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  198. ->addColumn('userid', 'biginteger', [ 'signed' => false ])
  199. ->addColumn('ip', 'string', [])
  200. ->addColumn('datetime', 'biginteger', [])
  201. ->addColumn('type', 'integer', [])
  202. ->addIndex([ 'userid' ])
  203. ->addForeignKey('userid', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  204. ->create();
  205. $this->table('payback', [ 'id' => false, 'primary_key' => [ 'id' ]])
  206. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  207. ->addColumn('total', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  208. ->addColumn('userid', 'biginteger', [])
  209. ->addColumn('ref_by', 'biginteger', [])
  210. ->addColumn('ref_get', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  211. ->addColumn('datetime', 'biginteger', [])
  212. ->create();
  213. $this->table('paylist', [ 'id' => false, 'primary_key' => [ 'id' ]])
  214. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  215. ->addColumn('userid', 'biginteger', [ 'signed' => false ])
  216. ->addColumn('total', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  217. ->addColumn('status', 'integer', [ 'default' => 0 ])
  218. ->addColumn('tradeno', 'string', [ 'default' => null ])
  219. ->addColumn('datetime', 'biginteger', [ 'default' => 0 ])
  220. ->addIndex([ 'userid' ])
  221. ->addForeignKey('userid', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  222. ->create();
  223. $this->table('shop', [ 'id' => false, 'primary_key' => [ 'id' ]])
  224. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  225. ->addColumn('name', 'string', [])
  226. ->addColumn('price', 'decimal', [ 'precision' => 12, 'scale' => 2 ])
  227. ->addColumn('content', 'text', [])
  228. ->addColumn('auto_renew', 'integer', [])
  229. ->addColumn('auto_reset_bandwidth', 'integer', [ 'default' => 0 ])
  230. ->addColumn('status', 'integer', [ 'default' => 1 ])
  231. ->create();
  232. $this->table('user_invite_code', [ 'id' => false, 'primary_key' => [ 'id' ]])
  233. ->addColumn('id', 'biginteger', [ 'identity' => true, 'signed' => false ])
  234. ->addColumn('code', 'string', [ ])
  235. ->addIndex([ 'code' ], [ 'unique' => true ])
  236. ->addColumn('user_id', 'biginteger', [ 'signed' => false ])
  237. ->addIndex([ 'user_id' ], [ 'unique' => true ])
  238. ->addColumn('created_at', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP' ])
  239. ->addColumn('updated_at', 'timestamp', [ 'default' => '2016-06-01 00:00:00' ])
  240. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  241. ->create();
  242. $this->table('node_online_log', [ 'id' => false, 'primary_key' => [ 'id' ]])
  243. ->addColumn('id', 'integer', [ 'identity' => true ])
  244. ->addColumn('node_id', 'integer', [])
  245. ->addColumn('online_user', 'integer', [])
  246. ->addColumn('log_time', 'integer', [])
  247. ->addIndex([ 'node_id' ])
  248. ->addForeignKey('node_id', 'node', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  249. ->create();
  250. $this->table('user_password_reset', [ 'id' => false, 'primary_key' => [ 'id' ]])
  251. ->addColumn('id', 'integer', [ 'identity' => true ])
  252. ->addColumn('email', 'string', [])
  253. ->addColumn('token', 'string', [])
  254. ->addColumn('init_time', 'integer', [])
  255. ->addColumn('expire_time', 'integer', [])
  256. ->create();
  257. $this->table('telegram_session', [ 'id' => false, 'primary_key' => [ 'id' ]])
  258. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  259. ->addColumn('user_id', 'biginteger', [])
  260. ->addColumn('type', 'integer', [])
  261. ->addColumn('session_content', 'string', [])
  262. ->addColumn('datetime', 'biginteger', [])
  263. ->create();
  264. $this->table('ticket', [ 'id' => false, 'primary_key' => [ 'id' ]])
  265. ->addColumn('id', 'biginteger', [ 'identity' => true ])
  266. ->addColumn('title', 'string', [])
  267. ->addColumn('content', 'json', [ 'comment' => '工单内容', 'default' => '' ])
  268. ->addColumn('userid', 'biginteger', [])
  269. ->addColumn('datetime', 'biginteger', [])
  270. ->addColumn('status', 'string', [ 'comment' => '工单状态', 'default' => '' ])
  271. ->addColumn('type', 'string', [ 'comment' => '工单类型', 'default' => 'other' ])
  272. ->create();
  273. $this->table('user_hourly_usage', [ 'id' => false, 'primary_key' => [ 'id' ]])
  274. ->addColumn('id', 'biginteger', [ 'identity' => true, 'signed' => false ])
  275. ->addColumn('user_id', 'biginteger', [ 'signed' => false ])
  276. ->addColumn('traffic', 'biginteger', [])
  277. ->addColumn('hourly_usage', 'biginteger', [])
  278. ->addColumn('datetime', 'integer', [])
  279. ->addIndex([ 'user_id' ])
  280. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  281. ->create();
  282. $this->table('user_subscribe_log', [ 'id' => false, 'primary_key' => [ 'id' ]])
  283. ->addColumn('id', 'biginteger', [ 'identity' => true, 'signed' => false ])
  284. ->addColumn('user_name', 'string', [ 'comment' => '用户名' ])
  285. ->addColumn('user_id', 'biginteger', [ 'comment' => '用户 ID','signed' => false ])
  286. ->addColumn('email', 'string', [ 'comment' => '用户邮箱' ])
  287. ->addColumn('subscribe_type', 'string', [ 'comment' => '获取的订阅类型' ])
  288. ->addColumn('request_ip', 'string', [ 'comment' => '请求 IP' ])
  289. ->addColumn('request_time', 'datetime', [ 'comment' => '请求时间' ])
  290. ->addColumn('request_user_agent', 'text', [ 'comment' => '请求 UA 信息','default' => null ])
  291. ->addIndex([ 'user_id' ])
  292. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  293. ->create();
  294. $this->table('user_token', [ 'id' => false, 'primary_key' => [ 'id' ]])
  295. ->addColumn('id', 'biginteger', [ 'identity' => true, 'signed' => false ])
  296. ->addColumn('token', 'string', [])
  297. ->addColumn('user_id', 'biginteger', [ 'signed' => false ])
  298. ->addColumn('create_time', 'biginteger', [ 'signed' => false ])
  299. ->addColumn('expire_time', 'biginteger', [])
  300. ->addIndex([ 'user_id' ])
  301. ->addForeignKey('user_id', 'user', 'id', [ 'delete' => 'CASCADE', 'update' => 'CASCADE' ])
  302. ->create();
  303. }
  304. public function down(): void
  305. {
  306. $this->table('user')->drop()->update();
  307. $this->table('node')->drop()->update();
  308. $this->table('alive_ip')->drop()->update();
  309. $this->table('announcement')->drop()->update();
  310. $this->table('bought')->drop()->update();
  311. $this->table('code')->drop()->update();
  312. $this->table('config')->drop()->update();
  313. $this->table('coupon')->drop()->update();
  314. $this->table('detect_ban_log')->drop()->update();
  315. $this->table('detect_list')->drop()->update();
  316. $this->table('detect_log')->drop()->update();
  317. $this->table('email_queue')->drop()->update();
  318. $this->table('email_verify')->drop()->update();
  319. $this->table('gconfig')->drop()->update();
  320. $this->table('link')->drop()->update();
  321. $this->table('login_ip')->drop()->update();
  322. $this->table('payback')->drop()->update();
  323. $this->table('paylist')->drop()->update();
  324. $this->table('shop')->drop()->update();
  325. $this->table('user_invite_code')->drop()->update();
  326. $this->table('node_online_log')->drop()->update();
  327. $this->table('user_password_reset')->drop()->update();
  328. $this->table('telegram_session')->drop()->update();
  329. $this->table('ticket')->drop()->update();
  330. $this->table('user_hourly_usage')->drop()->update();
  331. $this->table('user_subscribe_log')->drop()->update();
  332. $this->table('user_token')->drop()->update();
  333. }
  334. }