forked from nruffilo/regexquest.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
97 lines (80 loc) · 2.71 KB
/
database.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
-- phpMyAdmin SQL Dump
-- version 3.3.10.4
-- http://www.phpmyadmin.net
--
-- Host: db.regexherogame.com
-- Generation Time: Nov 12, 2012 at 12:12 PM
-- Server version: 5.1.39
-- PHP Version: 5.2.17
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `regexhero`
--
-- --------------------------------------------------------
--
-- Table structure for table `quests`
--
CREATE TABLE IF NOT EXISTS `quests` (
`quest_id` int(11) NOT NULL AUTO_INCREMENT,
`safe_name` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`difficulty` enum('tutorial','easy','medium','hard','insane') NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`creator_user_id` int(11) NOT NULL,
PRIMARY KEY (`quest_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
-- --------------------------------------------------------
--
-- Table structure for table `quest_questions`
--
CREATE TABLE IF NOT EXISTS `quest_questions` (
`question_id` int(11) NOT NULL AUTO_INCREMENT,
`quest_id` int(11) NOT NULL,
`question_number` int(11) NOT NULL,
`options` int(11) NOT NULL DEFAULT '1',
`type` enum('find','replace') NOT NULL,
`hint` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`answer` varchar(255) NOT NULL,
PRIMARY KEY (`question_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(200) NOT NULL,
`password` varchar(200) NOT NULL,
`first_name` varchar(200) NOT NULL,
`last_name` varchar(200) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`display_name` varchar(200) NOT NULL,
`problems_solved` int(11) NOT NULL,
`points` int(11) NOT NULL,
`title` varchar(255) NOT NULL DEFAULT 'Apprentice',
PRIMARY KEY (`user_id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
-- --------------------------------------------------------
--
-- Table structure for table `user_quest_status`
--
CREATE TABLE IF NOT EXISTS `user_quest_status` (
`user_id` int(11) NOT NULL,
`quest_name` varchar(200) NOT NULL,
`current_question` int(11) NOT NULL DEFAULT '0',
`completed` tinyint(4) NOT NULL DEFAULT '0',
UNIQUE KEY `user_id` (`user_id`,`quest_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `user_titles`
--
CREATE TABLE IF NOT EXISTS `user_titles` (
`user_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
UNIQUE KEY `user_id` (`user_id`,`title`),
KEY `user_id_2` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;