forked from Harimaron/ChatBox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtables.sql
30 lines (24 loc) · 914 Bytes
/
tables.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
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `my_users` (
`id` int(11) NOT NULL,
`username` text COLLATE utf8_bin NOT NULL,
`mail` text COLLATE utf8_bin NOT NULL,
`pass` text COLLATE utf8_bin NOT NULL,
`auth` int(11) NOT NULL DEFAULT '0',
`joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `shoutbox` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`message` text COLLATE utf8_bin NOT NULL,
`datepost` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
ALTER TABLE `my_users`
ADD PRIMARY KEY (`id`);
ALTER TABLE `shoutbox`
ADD PRIMARY KEY (`id`);
ALTER TABLE `my_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
ALTER TABLE `shoutbox`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55;