timekeeper_sql.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. CREATE TABLE `timekeeper` (
  2. `username` varchar(255) NOT NULL DEFAULT '',
  3. `enabled` tinyint(1) NOT NULL DEFAULT '0',
  4. `freeMins` int(10) NOT NULL DEFAULT '0',
  5. `enableTime` double NOT NULL DEFAULT '0',
  6. `disableTime` double NOT NULL DEFAULT '0',
  7. `minQuestionCount` int(11) NOT NULL DEFAULT '0',
  8. `usedMinutes` int(11) NOT NULL DEFAULT '0',
  9. `lastDate` int(11) NOT NULL DEFAULT '0',
  10. `maxDailyPlayTime` int(11) NOT NULL DEFAULT '0',
  11. PRIMARY KEY (`username`)
  12. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  13. CREATE TABLE `timekeeperPending` (
  14. `timekeeper_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  15. `timekeeper_username` varchar(255) NOT NULL DEFAULT '',
  16. `timekeeper_question` int(10) unsigned DEFAULT '0',
  17. `timekeeper_answereddatestamp` int(10) unsigned DEFAULT '0',
  18. `timekeeper_answer` text NOT NULL,
  19. PRIMARY KEY (`timekeeper_id`)
  20. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  21. CREATE TABLE `timekeeperQuestions` (
  22. `timekeeper_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  23. `timekeeper_subject` varchar(255) NOT NULL DEFAULT '',
  24. `timekeeper_questiondescription` text NOT NULL,
  25. `timekeeper_question` longtext NOT NULL,
  26. `timekeeper_addeddatestamp` int(10) unsigned DEFAULT '0',
  27. `timekeeper_yearlevel` int(2) unsigned DEFAULT '0',
  28. `timekeeper_answers` text NOT NULL,
  29. `timekeeper_correctanswer` int(3) unsigned DEFAULT '0',
  30. PRIMARY KEY (`timekeeper_id`)
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  32. CREATE TABLE `timekeeperReport` (
  33. `timekeeper_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  34. `timekeeper_username` varchar(255) NOT NULL DEFAULT '',
  35. `timekeeper_question` text NOT NULL,
  36. `timekeeper_answereddatestamp` int(10) unsigned DEFAULT '0',
  37. `timekeeper_userAnswer` text NOT NULL,
  38. `timekeeper_answer` text NOT NULL,
  39. `timekeeper_yearLevel` int(2) unsigned DEFAULT '0',
  40. `timekeeper_subject` varchar(255) NOT NULL DEFAULT '',
  41. `timekeeper_correct` int(1) unsigned DEFAULT '0',
  42. PRIMARY KEY (`timekeeper_id`)
  43. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  44. CREATE TABLE `timekeeperScore` (
  45. `timekeeper_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  46. `timekeeper_username` varchar(255) NOT NULL DEFAULT '',
  47. `timekeeper_lifetimequestions` int(10) unsigned DEFAULT '0',
  48. `timekeeper_lifetimecorrect` int(10) unsigned DEFAULT '0',
  49. `timekeeper_minutes` int(10) NOT NULL DEFAULT '0',
  50. `timekeeper_yearlevel` int(2) unsigned DEFAULT '0',
  51. `timekeeper_lastquestiondatestamp` int(10) unsigned DEFAULT '0',
  52. PRIMARY KEY (`timekeeper_id`)
  53. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  54. CREATE TABLE `timekeeperStats` (
  55. `timekeeper_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  56. `timekeeper_username` varchar(255) NOT NULL DEFAULT '',
  57. `timekeeper_subject` varchar(255) NOT NULL DEFAULT '',
  58. `timekeeper_percent` int(3) unsigned DEFAULT '0',
  59. `timekeeper_yearLevel` int(2) unsigned DEFAULT '0',
  60. `timekeeper_quantity` int(10) unsigned DEFAULT '0',
  61. PRIMARY KEY (`timekeeper_id`)
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  63. CREATE TABLE `tkLastQuestion` (
  64. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  65. `user` varchar(100) NOT NULL DEFAULT '',
  66. `LastQuestionHtml` longtext,
  67. PRIMARY KEY (`id`),
  68. KEY `user` (`user`)
  69. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  70. CREATE TABLE `tkPendingAnswer` (
  71. `username` varchar(100) NOT NULL,
  72. `token` char(32) NOT NULL,
  73. `payload` text NOT NULL,
  74. `created` int(10) unsigned NOT NULL,
  75. PRIMARY KEY (`username`)
  76. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  77. CREATE TABLE `tkReport` (
  78. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  79. `username` varchar(255) NOT NULL DEFAULT '',
  80. `subject` varchar(255) NOT NULL DEFAULT '',
  81. `question` text NOT NULL,
  82. `userAnswer` text NOT NULL,
  83. `answer` text NOT NULL,
  84. `correct` tinyint(1) unsigned NOT NULL DEFAULT '0',
  85. `answereddatestamp` int(10) unsigned NOT NULL DEFAULT '0',
  86. PRIMARY KEY (`id`),
  87. KEY `user_subject_date` (`username`,`subject`,`answereddatestamp`)
  88. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  89. CREATE TABLE `tk_wordList` (
  90. `indexNo` int(10) unsigned NOT NULL AUTO_INCREMENT,
  91. `word` varchar(100) NOT NULL,
  92. `usage` text,
  93. `year` tinyint(3) unsigned NOT NULL DEFAULT '1',
  94. PRIMARY KEY (`indexNo`),
  95. KEY `year` (`year`),
  96. KEY `word` (`word`)
  97. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  98. CREATE TABLE `tk_countries` (
  99. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  100. `country` varchar(100) NOT NULL DEFAULT '',
  101. `currency` varchar(100) DEFAULT NULL,
  102. `capital` varchar(100) DEFAULT NULL,
  103. `isoCode` varchar(3) DEFAULT NULL,
  104. `difficulty` tinyint(3) unsigned NOT NULL DEFAULT '10',
  105. `culture` text,
  106. `continent` varchar(50) DEFAULT NULL,
  107. `map_coords` text,
  108. PRIMARY KEY (`id`),
  109. KEY `continent` (`continent`)
  110. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;