20000101000000_init_database.php.new 22 KB

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