app_uoj233.sql 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. -- MySQL dump 10.13 Distrib 5.7.44, for Linux (x86_64)
  2. --
  3. -- Host: localhost Database: app_uoj233
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.44
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Current Database: `app_uoj233`
  18. --
  19. CREATE DATABASE /*!32312 IF NOT EXISTS*/ `app_uoj233` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
  20. USE `app_uoj233`;
  21. --
  22. -- Table structure for table `best_ac_submissions`
  23. --
  24. DROP TABLE IF EXISTS `best_ac_submissions`;
  25. /*!40101 SET @saved_cs_client = @@character_set_client */;
  26. /*!40101 SET character_set_client = utf8 */;
  27. CREATE TABLE `best_ac_submissions` (
  28. `problem_id` int(11) NOT NULL,
  29. `submitter` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  30. `submission_id` int(11) NOT NULL,
  31. `used_time` int(11) NOT NULL,
  32. `used_memory` int(11) NOT NULL,
  33. `tot_size` int(11) NOT NULL,
  34. `shortest_id` int(11) NOT NULL,
  35. `shortest_used_time` int(11) NOT NULL,
  36. `shortest_used_memory` int(11) NOT NULL,
  37. `shortest_tot_size` int(11) NOT NULL,
  38. PRIMARY KEY (`problem_id`,`submitter`)
  39. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  40. /*!40101 SET character_set_client = @saved_cs_client */;
  41. --
  42. --
  43. /*!40000 ALTER TABLE `best_ac_submissions` DISABLE KEYS */;
  44. /*!40000 ALTER TABLE `best_ac_submissions` ENABLE KEYS */;
  45. --
  46. -- Table structure for table `blogs`
  47. --
  48. DROP TABLE IF EXISTS `blogs`;
  49. /*!40101 SET @saved_cs_client = @@character_set_client */;
  50. /*!40101 SET character_set_client = utf8 */;
  51. CREATE TABLE `blogs` (
  52. `id` int(11) NOT NULL AUTO_INCREMENT,
  53. `title` text COLLATE utf8mb4_unicode_ci NOT NULL,
  54. `content` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  55. `post_time` datetime NOT NULL,
  56. `poster` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  57. `content_md` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  58. `zan` int(11) NOT NULL,
  59. `is_hidden` tinyint(1) NOT NULL,
  60. `type` char(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'B',
  61. `is_draft` tinyint(1) NOT NULL DEFAULT '0',
  62. PRIMARY KEY (`id`),
  63. KEY `poster` (`poster`,`post_time`)
  64. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  65. /*!40101 SET character_set_client = @saved_cs_client */;
  66. --
  67. --
  68. /*!40000 ALTER TABLE `blogs` DISABLE KEYS */;
  69. /*!40000 ALTER TABLE `blogs` ENABLE KEYS */;
  70. --
  71. -- Table structure for table `blogs_comments`
  72. --
  73. DROP TABLE IF EXISTS `blogs_comments`;
  74. /*!40101 SET @saved_cs_client = @@character_set_client */;
  75. /*!40101 SET character_set_client = utf8 */;
  76. CREATE TABLE `blogs_comments` (
  77. `id` int(11) NOT NULL AUTO_INCREMENT,
  78. `blog_id` int(11) NOT NULL,
  79. `content` text COLLATE utf8mb4_unicode_ci NOT NULL,
  80. `post_time` datetime NOT NULL,
  81. `poster` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  82. `zan` int(11) NOT NULL,
  83. `reply_id` int(11) NOT NULL,
  84. PRIMARY KEY (`id`)
  85. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  86. /*!40101 SET character_set_client = @saved_cs_client */;
  87. --
  88. --
  89. /*!40000 ALTER TABLE `blogs_comments` DISABLE KEYS */;
  90. /*!40000 ALTER TABLE `blogs_comments` ENABLE KEYS */;
  91. --
  92. -- Table structure for table `blogs_tags`
  93. --
  94. DROP TABLE IF EXISTS `blogs_tags`;
  95. /*!40101 SET @saved_cs_client = @@character_set_client */;
  96. /*!40101 SET character_set_client = utf8 */;
  97. CREATE TABLE `blogs_tags` (
  98. `id` int(11) NOT NULL AUTO_INCREMENT,
  99. `blog_id` int(11) NOT NULL,
  100. `tag` varchar(30) NOT NULL,
  101. PRIMARY KEY (`id`),
  102. KEY `blog_id` (`blog_id`),
  103. KEY `tag` (`tag`)
  104. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  105. /*!40101 SET character_set_client = @saved_cs_client */;
  106. --
  107. --
  108. /*!40000 ALTER TABLE `blogs_tags` DISABLE KEYS */;
  109. /*!40000 ALTER TABLE `blogs_tags` ENABLE KEYS */;
  110. --
  111. -- Table structure for table `click_zans`
  112. --
  113. DROP TABLE IF EXISTS `click_zans`;
  114. /*!40101 SET @saved_cs_client = @@character_set_client */;
  115. /*!40101 SET character_set_client = utf8 */;
  116. CREATE TABLE `click_zans` (
  117. `type` char(2) COLLATE utf8mb4_unicode_ci NOT NULL,
  118. `username` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  119. `target_id` int(11) NOT NULL,
  120. `val` tinyint(4) NOT NULL DEFAULT '1',
  121. PRIMARY KEY (`type`,`target_id`,`username`)
  122. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  123. /*!40101 SET character_set_client = @saved_cs_client */;
  124. --
  125. --
  126. /*!40000 ALTER TABLE `click_zans` DISABLE KEYS */;
  127. /*!40000 ALTER TABLE `click_zans` ENABLE KEYS */;
  128. --
  129. -- Table structure for table `contests`
  130. --
  131. DROP TABLE IF EXISTS `contests`;
  132. /*!40101 SET @saved_cs_client = @@character_set_client */;
  133. /*!40101 SET character_set_client = utf8 */;
  134. CREATE TABLE `contests` (
  135. `id` int(11) NOT NULL AUTO_INCREMENT,
  136. `name` varchar(50) NOT NULL,
  137. `start_time` datetime NOT NULL,
  138. `last_min` int(11) NOT NULL,
  139. `player_num` int(11) NOT NULL,
  140. `status` varchar(50) NOT NULL,
  141. `extra_config` varchar(500) DEFAULT NULL,
  142. `zan` int(11) NOT NULL,
  143. PRIMARY KEY (`id`)
  144. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  145. /*!40101 SET character_set_client = @saved_cs_client */;
  146. --
  147. --
  148. /*!40000 ALTER TABLE `contests` DISABLE KEYS */;
  149. /*!40000 ALTER TABLE `contests` ENABLE KEYS */;
  150. --
  151. -- Table structure for table `contests_asks`
  152. --
  153. DROP TABLE IF EXISTS `contests_asks`;
  154. /*!40101 SET @saved_cs_client = @@character_set_client */;
  155. /*!40101 SET character_set_client = utf8 */;
  156. CREATE TABLE `contests_asks` (
  157. `id` int(11) NOT NULL AUTO_INCREMENT,
  158. `contest_id` int(11) NOT NULL,
  159. `username` varchar(20) NOT NULL,
  160. `question` text NOT NULL,
  161. `answer` text NOT NULL,
  162. `post_time` datetime NOT NULL,
  163. `reply_time` datetime NOT NULL,
  164. `is_hidden` tinyint(1) DEFAULT '0',
  165. PRIMARY KEY (`id`)
  166. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  167. /*!40101 SET character_set_client = @saved_cs_client */;
  168. --
  169. --
  170. /*!40000 ALTER TABLE `contests_asks` DISABLE KEYS */;
  171. /*!40000 ALTER TABLE `contests_asks` ENABLE KEYS */;
  172. --
  173. -- Table structure for table `contests_notice`
  174. --
  175. DROP TABLE IF EXISTS `contests_notice`;
  176. /*!40101 SET @saved_cs_client = @@character_set_client */;
  177. /*!40101 SET character_set_client = utf8 */;
  178. CREATE TABLE `contests_notice` (
  179. `contest_id` int(11) NOT NULL,
  180. `title` varchar(30) NOT NULL,
  181. `content` varchar(500) NOT NULL,
  182. `time` datetime NOT NULL,
  183. KEY `contest_id` (`contest_id`)
  184. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  185. /*!40101 SET character_set_client = @saved_cs_client */;
  186. --
  187. --
  188. /*!40000 ALTER TABLE `contests_notice` DISABLE KEYS */;
  189. /*!40000 ALTER TABLE `contests_notice` ENABLE KEYS */;
  190. --
  191. -- Table structure for table `contests_permissions`
  192. --
  193. DROP TABLE IF EXISTS `contests_permissions`;
  194. /*!40101 SET @saved_cs_client = @@character_set_client */;
  195. /*!40101 SET character_set_client = utf8 */;
  196. CREATE TABLE `contests_permissions` (
  197. `username` varchar(20) NOT NULL,
  198. `contest_id` int(11) NOT NULL,
  199. PRIMARY KEY (`username`,`contest_id`)
  200. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  201. /*!40101 SET character_set_client = @saved_cs_client */;
  202. --
  203. --
  204. /*!40000 ALTER TABLE `contests_permissions` DISABLE KEYS */;
  205. /*!40000 ALTER TABLE `contests_permissions` ENABLE KEYS */;
  206. --
  207. -- Table structure for table `contests_problems`
  208. --
  209. DROP TABLE IF EXISTS `contests_problems`;
  210. /*!40101 SET @saved_cs_client = @@character_set_client */;
  211. /*!40101 SET character_set_client = utf8 */;
  212. CREATE TABLE `contests_problems` (
  213. `problem_id` int(11) NOT NULL,
  214. `contest_id` int(11) NOT NULL,
  215. PRIMARY KEY (`problem_id`,`contest_id`)
  216. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  217. /*!40101 SET character_set_client = @saved_cs_client */;
  218. --
  219. --
  220. /*!40000 ALTER TABLE `contests_problems` DISABLE KEYS */;
  221. /*!40000 ALTER TABLE `contests_problems` ENABLE KEYS */;
  222. --
  223. -- Table structure for table `contests_registrants`
  224. --
  225. DROP TABLE IF EXISTS `contests_registrants`;
  226. /*!40101 SET @saved_cs_client = @@character_set_client */;
  227. /*!40101 SET character_set_client = utf8 */;
  228. CREATE TABLE `contests_registrants` (
  229. `username` varchar(20) NOT NULL,
  230. `user_rating` int(11) NOT NULL,
  231. `contest_id` int(11) NOT NULL,
  232. `has_participated` tinyint(1) NOT NULL,
  233. `rank` int(11) NOT NULL,
  234. `user_rd` double DEFAULT NULL,
  235. `user_vol` double DEFAULT NULL,
  236. PRIMARY KEY (`contest_id`,`username`)
  237. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  238. /*!40101 SET character_set_client = @saved_cs_client */;
  239. --
  240. --
  241. /*!40000 ALTER TABLE `contests_registrants` DISABLE KEYS */;
  242. /*!40000 ALTER TABLE `contests_registrants` ENABLE KEYS */;
  243. --
  244. -- Table structure for table `contests_submissions`
  245. --
  246. DROP TABLE IF EXISTS `contests_submissions`;
  247. /*!40101 SET @saved_cs_client = @@character_set_client */;
  248. /*!40101 SET character_set_client = utf8 */;
  249. CREATE TABLE `contests_submissions` (
  250. `contest_id` int(11) NOT NULL,
  251. `submitter` varchar(20) NOT NULL,
  252. `problem_id` int(11) NOT NULL,
  253. `submission_id` int(11) NOT NULL,
  254. `score` int(11) NOT NULL,
  255. `penalty` int(11) NOT NULL,
  256. PRIMARY KEY (`contest_id`,`submitter`,`problem_id`)
  257. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  258. /*!40101 SET character_set_client = @saved_cs_client */;
  259. --
  260. --
  261. /*!40000 ALTER TABLE `contests_submissions` DISABLE KEYS */;
  262. /*!40000 ALTER TABLE `contests_submissions` ENABLE KEYS */;
  263. --
  264. -- Table structure for table `custom_test_submissions`
  265. --
  266. DROP TABLE IF EXISTS `custom_test_submissions`;
  267. /*!40101 SET @saved_cs_client = @@character_set_client */;
  268. /*!40101 SET character_set_client = utf8 */;
  269. CREATE TABLE `custom_test_submissions` (
  270. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  271. `problem_id` int(10) unsigned NOT NULL,
  272. `submit_time` datetime NOT NULL,
  273. `submitter` varchar(20) NOT NULL,
  274. `content` text NOT NULL,
  275. `judge_time` datetime DEFAULT NULL,
  276. `result` blob NOT NULL,
  277. `status` varchar(20) NOT NULL,
  278. `status_details` varchar(100) NOT NULL,
  279. PRIMARY KEY (`id`)
  280. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  281. /*!40101 SET character_set_client = @saved_cs_client */;
  282. --
  283. --
  284. /*!40000 ALTER TABLE `custom_test_submissions` DISABLE KEYS */;
  285. /*!40000 ALTER TABLE `custom_test_submissions` ENABLE KEYS */;
  286. --
  287. -- Table structure for table `datum_requests`
  288. --
  289. DROP TABLE IF EXISTS `datum_requests`;
  290. /*!40101 SET @saved_cs_client = @@character_set_client */;
  291. /*!40101 SET character_set_client = utf8 */;
  292. CREATE TABLE `datum_requests` (
  293. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  294. `pid` int(10) unsigned NOT NULL,
  295. `request_time` datetime NOT NULL,
  296. `finish_time` datetime DEFAULT NULL,
  297. `std` mediumtext COLLATE utf8mb4_unicode_ci,
  298. `timelimit` int(11) DEFAULT NULL,
  299. `memlimit` int(11) DEFAULT NULL,
  300. `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  301. `generator` mediumtext COLLATE utf8mb4_unicode_ci,
  302. PRIMARY KEY (`id`)
  303. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  304. /*!40101 SET character_set_client = @saved_cs_client */;
  305. --
  306. --
  307. /*!40000 ALTER TABLE `datum_requests` DISABLE KEYS */;
  308. /*!40000 ALTER TABLE `datum_requests` ENABLE KEYS */;
  309. --
  310. -- Table structure for table `datum_streams`
  311. --
  312. DROP TABLE IF EXISTS `datum_streams`;
  313. /*!40101 SET @saved_cs_client = @@character_set_client */;
  314. /*!40101 SET character_set_client = utf8 */;
  315. CREATE TABLE `datum_streams` (
  316. `id` int(11) NOT NULL,
  317. `stream` mediumtext COLLATE utf8mb4_unicode_ci,
  318. PRIMARY KEY (`id`),
  319. UNIQUE KEY `id` (`id`)
  320. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  321. /*!40101 SET character_set_client = @saved_cs_client */;
  322. --
  323. --
  324. /*!40000 ALTER TABLE `datum_streams` DISABLE KEYS */;
  325. /*!40000 ALTER TABLE `datum_streams` ENABLE KEYS */;
  326. --
  327. -- Table structure for table `hacks`
  328. --
  329. DROP TABLE IF EXISTS `hacks`;
  330. /*!40101 SET @saved_cs_client = @@character_set_client */;
  331. /*!40101 SET character_set_client = utf8 */;
  332. CREATE TABLE `hacks` (
  333. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  334. `problem_id` int(10) unsigned NOT NULL,
  335. `contest_id` int(10) unsigned DEFAULT NULL,
  336. `submission_id` int(10) unsigned NOT NULL,
  337. `hacker` varchar(20) NOT NULL,
  338. `owner` varchar(20) NOT NULL,
  339. `input` varchar(150) NOT NULL,
  340. `input_type` char(20) NOT NULL,
  341. `submit_time` datetime NOT NULL,
  342. `judge_time` datetime DEFAULT NULL,
  343. `success` tinyint(1) DEFAULT NULL,
  344. `details` blob NOT NULL,
  345. `is_hidden` tinyint(1) NOT NULL,
  346. PRIMARY KEY (`id`),
  347. KEY `submission_id` (`submission_id`),
  348. KEY `is_hidden` (`is_hidden`,`problem_id`)
  349. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  350. /*!40101 SET character_set_client = @saved_cs_client */;
  351. --
  352. --
  353. /*!40000 ALTER TABLE `hacks` DISABLE KEYS */;
  354. /*!40000 ALTER TABLE `hacks` ENABLE KEYS */;
  355. --
  356. -- Table structure for table `important_blogs`
  357. --
  358. DROP TABLE IF EXISTS `important_blogs`;
  359. /*!40101 SET @saved_cs_client = @@character_set_client */;
  360. /*!40101 SET character_set_client = utf8 */;
  361. CREATE TABLE `important_blogs` (
  362. `blog_id` int(11) NOT NULL,
  363. `level` int(11) NOT NULL,
  364. PRIMARY KEY (`blog_id`)
  365. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  366. /*!40101 SET character_set_client = @saved_cs_client */;
  367. --
  368. --
  369. /*!40000 ALTER TABLE `important_blogs` DISABLE KEYS */;
  370. /*!40000 ALTER TABLE `important_blogs` ENABLE KEYS */;
  371. --
  372. -- Table structure for table `judger_info`
  373. --
  374. DROP TABLE IF EXISTS `judger_info`;
  375. /*!40101 SET @saved_cs_client = @@character_set_client */;
  376. /*!40101 SET character_set_client = utf8 */;
  377. CREATE TABLE `judger_info` (
  378. `judger_name` varchar(50) NOT NULL,
  379. `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  380. `ip` char(20) NOT NULL,
  381. PRIMARY KEY (`judger_name`)
  382. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  383. /*!40101 SET character_set_client = @saved_cs_client */;
  384. --
  385. --
  386. /*!40000 ALTER TABLE `judger_info` DISABLE KEYS */;
  387. /*!40000 ALTER TABLE `judger_info` ENABLE KEYS */;
  388. --
  389. -- Table structure for table `pastes`
  390. --
  391. DROP TABLE IF EXISTS `pastes`;
  392. /*!40101 SET @saved_cs_client = @@character_set_client */;
  393. /*!40101 SET character_set_client = utf8 */;
  394. CREATE TABLE `pastes` (
  395. `index` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  396. `creator` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  397. `created_at` datetime DEFAULT NULL,
  398. `content` text COLLATE utf8mb4_unicode_ci,
  399. PRIMARY KEY (`index`),
  400. UNIQUE KEY `pastes_index_uindex` (`index`),
  401. KEY `pastes_created_at_index` (`created_at`)
  402. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  403. /*!40101 SET character_set_client = @saved_cs_client */;
  404. --
  405. --
  406. /*!40000 ALTER TABLE `pastes` DISABLE KEYS */;
  407. /*!40000 ALTER TABLE `pastes` ENABLE KEYS */;
  408. --
  409. -- Table structure for table `problems`
  410. --
  411. DROP TABLE IF EXISTS `problems`;
  412. /*!40101 SET @saved_cs_client = @@character_set_client */;
  413. /*!40101 SET character_set_client = utf8 */;
  414. CREATE TABLE `problems` (
  415. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  416. `title` text NOT NULL,
  417. `is_hidden` tinyint(1) NOT NULL DEFAULT '0',
  418. `submission_requirement` text,
  419. `hackable` tinyint(1) NOT NULL DEFAULT '0',
  420. `extra_config` varchar(500) NOT NULL DEFAULT '{"view_content_type":"ALL","view_details_type":"ALL"}',
  421. `zan` int(11) NOT NULL,
  422. `ac_num` int(11) NOT NULL DEFAULT '0',
  423. `submit_num` int(11) NOT NULL DEFAULT '0',
  424. `ctrl` varchar(20) DEFAULT NULL,
  425. PRIMARY KEY (`id`)
  426. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  427. /*!40101 SET character_set_client = @saved_cs_client */;
  428. --
  429. --
  430. /*!40000 ALTER TABLE `problems` DISABLE KEYS */;
  431. /*!40000 ALTER TABLE `problems` ENABLE KEYS */;
  432. --
  433. -- Table structure for table `problems_contents`
  434. --
  435. DROP TABLE IF EXISTS `problems_contents`;
  436. /*!40101 SET @saved_cs_client = @@character_set_client */;
  437. /*!40101 SET character_set_client = utf8 */;
  438. CREATE TABLE `problems_contents` (
  439. `id` int(11) NOT NULL,
  440. `statement` mediumtext NOT NULL,
  441. `statement_md` mediumtext NOT NULL,
  442. PRIMARY KEY (`id`)
  443. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  444. /*!40101 SET character_set_client = @saved_cs_client */;
  445. --
  446. --
  447. /*!40000 ALTER TABLE `problems_contents` DISABLE KEYS */;
  448. /*!40000 ALTER TABLE `problems_contents` ENABLE KEYS */;
  449. --
  450. -- Table structure for table `problems_permissions`
  451. --
  452. DROP TABLE IF EXISTS `problems_permissions`;
  453. /*!40101 SET @saved_cs_client = @@character_set_client */;
  454. /*!40101 SET character_set_client = utf8 */;
  455. CREATE TABLE `problems_permissions` (
  456. `username` varchar(20) NOT NULL,
  457. `problem_id` int(11) NOT NULL,
  458. PRIMARY KEY (`username`,`problem_id`)
  459. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  460. /*!40101 SET character_set_client = @saved_cs_client */;
  461. --
  462. --
  463. /*!40000 ALTER TABLE `problems_permissions` DISABLE KEYS */;
  464. /*!40000 ALTER TABLE `problems_permissions` ENABLE KEYS */;
  465. --
  466. -- Table structure for table `problems_tags`
  467. --
  468. DROP TABLE IF EXISTS `problems_tags`;
  469. /*!40101 SET @saved_cs_client = @@character_set_client */;
  470. /*!40101 SET character_set_client = utf8 */;
  471. CREATE TABLE `problems_tags` (
  472. `id` int(11) NOT NULL AUTO_INCREMENT,
  473. `problem_id` int(11) NOT NULL,
  474. `tag` varchar(30) NOT NULL,
  475. PRIMARY KEY (`id`),
  476. KEY `problem_id` (`problem_id`),
  477. KEY `tag` (`tag`)
  478. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  479. /*!40101 SET character_set_client = @saved_cs_client */;
  480. --
  481. --
  482. /*!40000 ALTER TABLE `problems_tags` DISABLE KEYS */;
  483. /*!40000 ALTER TABLE `problems_tags` ENABLE KEYS */;
  484. --
  485. -- Table structure for table `rp`
  486. --
  487. DROP TABLE IF EXISTS `rp`;
  488. /*!40101 SET @saved_cs_client = @@character_set_client */;
  489. /*!40101 SET character_set_client = utf8 */;
  490. CREATE TABLE `rp` (
  491. `pid` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
  492. `title` text COLLATE utf8mb4_unicode_ci NOT NULL,
  493. `statement` text COLLATE utf8mb4_unicode_ci,
  494. PRIMARY KEY (`pid`)
  495. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  496. /*!40101 SET character_set_client = @saved_cs_client */;
  497. --
  498. --
  499. /*!40000 ALTER TABLE `rp` DISABLE KEYS */;
  500. /*!40000 ALTER TABLE `rp` ENABLE KEYS */;
  501. --
  502. -- Table structure for table `search_requests`
  503. --
  504. DROP TABLE IF EXISTS `search_requests`;
  505. /*!40101 SET @saved_cs_client = @@character_set_client */;
  506. /*!40101 SET character_set_client = utf8 */;
  507. CREATE TABLE `search_requests` (
  508. `id` int(11) NOT NULL AUTO_INCREMENT,
  509. `created_at` datetime NOT NULL,
  510. `remote_addr` varchar(50) NOT NULL,
  511. `type` enum('search','autocomplete') NOT NULL,
  512. `cache_id` int(11) NOT NULL,
  513. `q` varchar(100) NOT NULL,
  514. `content` text NOT NULL,
  515. `result` mediumtext NOT NULL,
  516. PRIMARY KEY (`id`),
  517. KEY `remote_addr` (`remote_addr`,`created_at`),
  518. KEY `created_at` (`created_at`)
  519. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  520. /*!40101 SET character_set_client = @saved_cs_client */;
  521. --
  522. --
  523. /*!40000 ALTER TABLE `search_requests` DISABLE KEYS */;
  524. /*!40000 ALTER TABLE `search_requests` ENABLE KEYS */;
  525. --
  526. -- Table structure for table `songs`
  527. --
  528. DROP TABLE IF EXISTS `songs`;
  529. /*!40101 SET @saved_cs_client = @@character_set_client */;
  530. /*!40101 SET character_set_client = utf8 */;
  531. CREATE TABLE `songs` (
  532. `id` int(11) NOT NULL AUTO_INCREMENT,
  533. `name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  534. `writer` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  535. `album` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  536. `cover` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  537. `click` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  538. `user` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  539. PRIMARY KEY (`id`)
  540. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  541. /*!40101 SET character_set_client = @saved_cs_client */;
  542. --
  543. --
  544. /*!40000 ALTER TABLE `songs` DISABLE KEYS */;
  545. /*!40000 ALTER TABLE `songs` ENABLE KEYS */;
  546. --
  547. -- Table structure for table `submissions`
  548. --
  549. DROP TABLE IF EXISTS `submissions`;
  550. /*!40101 SET @saved_cs_client = @@character_set_client */;
  551. /*!40101 SET character_set_client = utf8 */;
  552. CREATE TABLE `submissions` (
  553. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  554. `problem_id` int(10) unsigned NOT NULL,
  555. `contest_id` int(10) unsigned DEFAULT NULL,
  556. `submit_time` datetime NOT NULL,
  557. `submitter` varchar(20) NOT NULL,
  558. `content` text NOT NULL,
  559. `language` varchar(15) NOT NULL,
  560. `tot_size` int(11) NOT NULL,
  561. `judge_time` datetime DEFAULT NULL,
  562. `result` blob NOT NULL,
  563. `status` varchar(20) NOT NULL,
  564. `result_error` varchar(20) DEFAULT NULL,
  565. `score` int(11) DEFAULT NULL,
  566. `used_time` int(11) NOT NULL DEFAULT '0',
  567. `used_memory` int(11) NOT NULL DEFAULT '0',
  568. `is_hidden` tinyint(1) NOT NULL,
  569. `status_details` varchar(100) NOT NULL,
  570. PRIMARY KEY (`id`),
  571. KEY `is_hidden` (`is_hidden`,`problem_id`),
  572. KEY `submitter` (`submitter`,`submit_time`)
  573. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  574. /*!40101 SET character_set_client = @saved_cs_client */;
  575. --
  576. --
  577. /*!40000 ALTER TABLE `submissions` DISABLE KEYS */;
  578. /*!40000 ALTER TABLE `submissions` ENABLE KEYS */;
  579. --
  580. -- Table structure for table `user_info`
  581. --
  582. DROP TABLE IF EXISTS `user_info`;
  583. /*!40101 SET @saved_cs_client = @@character_set_client */;
  584. /*!40101 SET character_set_client = utf8 */;
  585. CREATE TABLE `user_info` (
  586. `usergroup` char(1) NOT NULL DEFAULT 'U',
  587. `username` varchar(20) NOT NULL,
  588. `email` varchar(50) NOT NULL,
  589. `password` char(32) NOT NULL,
  590. `svn_password` char(10) NOT NULL,
  591. `rating` int(11) NOT NULL DEFAULT '1500',
  592. `qq` bigint(20) NOT NULL,
  593. `sex` char(1) NOT NULL DEFAULT 'U',
  594. `ac_num` int(11) NOT NULL,
  595. `register_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  596. `remote_addr` varchar(50) NOT NULL,
  597. `http_x_forwarded_for` varchar(50) NOT NULL,
  598. `remember_token` char(60) NOT NULL,
  599. `motto` varchar(200) NOT NULL,
  600. `extgroups` varchar(128) DEFAULT NULL,
  601. `privs` text,
  602. `ctrls` varchar(128) DEFAULT NULL,
  603. `childgroup` varchar(20) DEFAULT NULL,
  604. `certs` varchar(64) DEFAULT NULL,
  605. `certslist` varchar(255) DEFAULT NULL,
  606. `aboutme_blogid` int(11) DEFAULT NULL,
  607. `luogu_clientid` char(60) DEFAULT NULL,
  608. `luogu_uid` int(11) DEFAULT NULL,
  609. `rating_rd` double DEFAULT NULL,
  610. `rating_vol` double DEFAULT NULL,
  611. `bgurl` text,
  612. PRIMARY KEY (`username`),
  613. KEY `rating` (`rating`,`username`),
  614. KEY `ac_num` (`ac_num`,`username`)
  615. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  616. /*!40101 SET character_set_client = @saved_cs_client */;
  617. --
  618. --
  619. /*!40000 ALTER TABLE `user_info` DISABLE KEYS */;
  620. /*!40000 ALTER TABLE `user_info` ENABLE KEYS */;
  621. --
  622. -- Table structure for table `user_msg`
  623. --
  624. DROP TABLE IF EXISTS `user_msg`;
  625. /*!40101 SET @saved_cs_client = @@character_set_client */;
  626. /*!40101 SET character_set_client = utf8 */;
  627. CREATE TABLE `user_msg` (
  628. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  629. `sender` varchar(20) NOT NULL,
  630. `receiver` varchar(20) NOT NULL,
  631. `message` varchar(5000) NOT NULL,
  632. `send_time` datetime NOT NULL,
  633. `read_time` datetime DEFAULT NULL,
  634. PRIMARY KEY (`id`)
  635. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  636. /*!40101 SET character_set_client = @saved_cs_client */;
  637. --
  638. --
  639. /*!40000 ALTER TABLE `user_msg` DISABLE KEYS */;
  640. /*!40000 ALTER TABLE `user_msg` ENABLE KEYS */;
  641. --
  642. -- Table structure for table `user_system_msg`
  643. --
  644. DROP TABLE IF EXISTS `user_system_msg`;
  645. /*!40101 SET @saved_cs_client = @@character_set_client */;
  646. /*!40101 SET character_set_client = utf8 */;
  647. CREATE TABLE `user_system_msg` (
  648. `id` int(11) NOT NULL AUTO_INCREMENT,
  649. `title` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  650. `content` varchar(300) COLLATE utf8mb4_unicode_ci NOT NULL,
  651. `receiver` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  652. `send_time` datetime NOT NULL,
  653. `read_time` datetime DEFAULT NULL,
  654. PRIMARY KEY (`id`)
  655. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  656. /*!40101 SET character_set_client = @saved_cs_client */;
  657. --
  658. --
  659. /*!40000 ALTER TABLE `user_system_msg` DISABLE KEYS */;
  660. /*!40000 ALTER TABLE `user_system_msg` ENABLE KEYS */;
  661. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  662. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  663. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  664. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  665. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  666. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  667. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  668. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  669. -- Dump completed on 2026-09-24 19:40:11