-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_schema.sql
More file actions
98 lines (79 loc) · 2.58 KB
/
_schema.sql
File metadata and controls
98 lines (79 loc) · 2.58 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `neighbr_hood`
--
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE IF NOT EXISTS `comments` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`neighbr` varchar(16) NOT NULL,
`post` int(16) NOT NULL,
`title` varchar(256) NOT NULL,
`note` mediumtext NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7660 ;
-- --------------------------------------------------------
--
-- Table structure for table `connections`
--
CREATE TABLE IF NOT EXISTS `connections` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
`neighbr` varchar(16) NOT NULL,
`token` varchar(128) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Table structure for table `images`
--
CREATE TABLE IF NOT EXISTS `images` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`neighbr` varchar(16) NOT NULL,
`binary` mediumblob NOT NULL,
`name` varchar(64) NOT NULL,
`type` varchar(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`neighbr` varchar(16) NOT NULL,
`type` varchar(16) NOT NULL,
`source` varchar(256) DEFAULT NULL,
`title` varchar(256) NOT NULL,
`note` mediumtext NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`objectionable` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1183 ;
-- --------------------------------------------------------
--
-- Table structure for table `tags`
--
CREATE TABLE IF NOT EXISTS `tags` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`post` int(16) NOT NULL,
`tag` varchar(128) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`email` varchar(256) NOT NULL,
`username` varchar(16) NOT NULL,
`password` varchar(32) NOT NULL,
`permissions` varchar(128) NOT NULL,
`friends` varchar(5096) NOT NULL DEFAULT 'neighbrhood',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ;