app_uoj233.sql 24 KB

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