forked from CSS-Tricks/Chat2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetup.sql
24 lines (22 loc) · 861 Bytes
/
Setup.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
CREATE TABLE IF NOT EXISTS `chat_rooms` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`numofuser` int(10) NOT NULL,
`file` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
CREATE TABLE IF NOT EXISTS `chat_users` (
`id` tinyint(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`status` tinyint(1) NOT NULL,
`time_mod` int(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
CREATE TABLE IF NOT EXISTS `chat_users_rooms` (
`id` int(100) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`room` varchar(100) NOT NULL,
`mod_time` int(40) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1472 ;