timekeeper_sql.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 `timekeeperStatistics` (
  64. `uniqueId` int(10) unsigned NOT NULL AUTO_INCREMENT,
  65. `userName` varchar(255) NOT NULL DEFAULT '',
  66. `gameName` varchar(255) NOT NULL DEFAULT '',
  67. `playDate` int(10) unsigned NOT NULL DEFAULT '0',
  68. `minutesPlayed` int(10) unsigned NOT NULL DEFAULT '0',
  69. PRIMARY KEY (`uniqueId`),
  70. KEY `user_game_date` (`userName`,`gameName`,`playDate`)
  71. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  72. CREATE TABLE `tkLastQuestion` (
  73. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  74. `user` varchar(100) NOT NULL DEFAULT '',
  75. `LastQuestionHtml` longtext,
  76. PRIMARY KEY (`id`),
  77. KEY `user` (`user`)
  78. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  79. CREATE TABLE `tkPendingAnswer` (
  80. `username` varchar(100) NOT NULL,
  81. `token` char(32) NOT NULL,
  82. `payload` text NOT NULL,
  83. `created` int(10) unsigned NOT NULL,
  84. PRIMARY KEY (`username`)
  85. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  86. CREATE TABLE `tkReport` (
  87. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  88. `username` varchar(255) NOT NULL DEFAULT '',
  89. `subject` varchar(255) NOT NULL DEFAULT '',
  90. `question` text NOT NULL,
  91. `userAnswer` text NOT NULL,
  92. `answer` text NOT NULL,
  93. `correct` tinyint(1) unsigned NOT NULL DEFAULT '0',
  94. `answereddatestamp` int(10) unsigned NOT NULL DEFAULT '0',
  95. PRIMARY KEY (`id`),
  96. KEY `user_subject_date` (`username`,`subject`,`answereddatestamp`)
  97. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  98. CREATE TABLE `tk_wordList` (
  99. `indexNo` int(10) unsigned NOT NULL AUTO_INCREMENT,
  100. `word` varchar(100) NOT NULL,
  101. `usage` text,
  102. `year` tinyint(3) unsigned NOT NULL DEFAULT '1',
  103. PRIMARY KEY (`indexNo`),
  104. KEY `year` (`year`),
  105. KEY `word` (`word`)
  106. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  107. CREATE TABLE `tk_countries` (
  108. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  109. `country` varchar(100) NOT NULL DEFAULT '',
  110. `currency` varchar(100) DEFAULT NULL,
  111. `capital` varchar(100) DEFAULT NULL,
  112. `isoCode` varchar(3) DEFAULT NULL,
  113. `difficulty` tinyint(3) unsigned NOT NULL DEFAULT '10',
  114. `culture` text,
  115. `continent` varchar(50) DEFAULT NULL,
  116. `map_coords` text,
  117. PRIMARY KEY (`id`),
  118. KEY `continent` (`continent`)
  119. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;