-
Notifications
You must be signed in to change notification settings - Fork 1
/
teendevops.sql
159 lines (130 loc) · 4.48 KB
/
teendevops.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `Arinerron_teendevops`
--
CREATE DATABASE IF NOT EXISTS `teendevops` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `Arinerron_teendevops`;
-- --------------------------------------------------------
--
-- Table structure for table `channels`
--
CREATE TABLE `channels` (
`id` int(11) NOT NULL COMMENT 'Channel ID',
`creator` varchar(50) NOT NULL COMMENT 'Channel Creator',
`title` varchar(20) NOT NULL,
`description` varchar(1000) NOT NULL DEFAULT 'A channel for 1337 h@xX0rz',
`deleted` varchar(5) NOT NULL DEFAULT 'false'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table contains all of the channels.';
-- --------------------------------------------------------
--
-- Table structure for table `chat`
--
CREATE TABLE `chat` (
`username` varchar(50) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`channel` varchar(50) NOT NULL,
`message` varchar(1000) NOT NULL,
`deleted` varchar(5) NOT NULL,
`id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table contains all of the chat messages.';
-- --------------------------------------------------------
--
-- Table structure for table `flags`
--
CREATE TABLE `flags` (
`id` int(11) NOT NULL,
`flag` varchar(50) NOT NULL,
`worth` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the user''s flags discovered.';
-- --------------------------------------------------------
--
-- Table structure for table `login_attempts`
--
CREATE TABLE `login_attempts` (
`id` int(11) NOT NULL COMMENT 'User ID',
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Time of Login Attempt',
`ip` varchar(50) NOT NULL COMMENT 'IP Address of Request',
`insecure_ip` varchar(50) NOT NULL COMMENT 'Spoofed IP Address of Request',
`success` varchar(5) NOT NULL COMMENT 'Login Success?'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table contains all of the login attempts.';
-- --------------------------------------------------------
--
-- Table structure for table `resetkeys`
--
CREATE TABLE `resetkeys` (
`id` int(11) NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ip` varchar(48) NOT NULL,
`token` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='The table for resetting passwords and stuff';
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL COMMENT 'User ID',
`username` varchar(25) NOT NULL COMMENT 'Username',
`password` varchar(256) NOT NULL COMMENT 'Hashed Password',
`name` int(25) NOT NULL COMMENT 'Username (ignore this column)',
`email` varchar(255) NOT NULL COMMENT 'Email Address',
`banned` varchar(5) NOT NULL COMMENT 'Banned?',
`description` varchar(500) NOT NULL COMMENT 'User Description',
`languages` varchar(100) NOT NULL COMMENT 'Known Languages',
`location` varchar(100) NOT NULL COMMENT 'User Location',
`rank` varchar(5) NOT NULL DEFAULT '0',
`icon` varchar(248) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table contains all of the core user data.';
--
-- Indexes for dumped tables
--
--
-- Indexes for table `channels`
--
ALTER TABLE `channels`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `chat`
--
ALTER TABLE `chat`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `flags`
--
ALTER TABLE `flags`
ADD PRIMARY KEY (`id`,`flag`);
--
-- Indexes for table `resetkeys`
--
ALTER TABLE `resetkeys`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `channels`
--
ALTER TABLE `channels`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Channel ID', AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `chat`
--
ALTER TABLE `chat`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=720;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'User ID', AUTO_INCREMENT=15;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;