-
Notifications
You must be signed in to change notification settings - Fork 0
/
makespace.sql
48 lines (39 loc) · 1.35 KB
/
makespace.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
--
-- Database: `makespace`
--
CREATE DATABASE IF NOT EXISTS `makespace` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `makespace`;
-- --------------------------------------------------------
--
-- Table structure for table `connections`
--
CREATE TABLE IF NOT EXISTS `connections` (
`connecion_id` int(11) NOT NULL AUTO_INCREMENT,
`user_1` varchar(100) NOT NULL,
`user_2` varchar(100) NOT NULL,
`pending` int(11) NOT NULL,
PRIMARY KEY (`connecion_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ;
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE IF NOT EXISTS `messages` (
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`from_user` int(11) NOT NULL,
`to_user` int(11) NOT NULL,
`message` varchar(5000) NOT NULL,
PRIMARY KEY (`message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=310 ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`password` varchar(1000) NOT NULL,
`head` int(2) NOT NULL,
`last_active` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;