-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate.sql
More file actions
26 lines (24 loc) · 867 Bytes
/
create.sql
File metadata and controls
26 lines (24 loc) · 867 Bytes
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
CREATE TABLE IF NOT EXISTS `dorms` (
`dorm_id` int(11) NOT NULL,
`dorm_name` varchar(50) NOT NULL,
UNIQUE KEY `dorm_id` (`dorm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `members` (
`username` varchar(50) NOT NULL,
`password` varchar(256) NOT NULL DEFAULT '',
UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `rooms` (
`id` int(11) NOT NULL,
`room_number` int(11) NOT NULL,
`state` int(11) NOT NULL,
`dorm_id` int(11) NOT NULL,
`floor_num` int(11) NOT NULL,
`wing` varchar(5) NOT NULL,
`date` varchar(10) NOT NULL DEFAULT '',
`notes` varchar(100) NOT NULL DEFAULT '',
`state1` int(11) NOT NULL DEFAULT '0',
`state2` int(11) NOT NULL DEFAULT '0',
`state3` int(11) NOT NULL DEFAULT '0',
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;