-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtables.sql
74 lines (58 loc) · 2.08 KB
/
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
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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `nestdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `friends`
--
CREATE TABLE `friends` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user` varchar(16) DEFAULT NULL,
`friend` varchar(16) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user` (`user`(6)),
KEY `friend` (`friend`(6))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
--
-- Dumping data for table `friends`
--
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`auth` varchar(16) DEFAULT NULL,
`recip` varchar(16) DEFAULT NULL,
`pm` char(1) DEFAULT NULL,
`time` int(10) unsigned DEFAULT NULL,
`message` varchar(4096) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `auth` (`auth`(6)),
KEY `recip` (`recip`(6))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
--
-- Dumping data for table `messages`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` int(11) unsigned DEFAULT NULL,
`firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`age` tinyint(3) unsigned DEFAULT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` VALUES(1, 'google', 123456, 'Andre', 'Venter', '[email protected]', 47, 'We do our best!');
INSERT INTO `users` VALUES(3, 'snitch', 123456, 'Andre', 'Venter', '[email protected]', 47, 'It was not me!');
INSERT INTO `users` VALUES(4, 'thinkadoo', 123456, 'Andre', 'Venter', '[email protected]', 47, 'Let''s code up a storm!');