20000101000000_init_database.php.new 22 KB

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