-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sql
209 lines (179 loc) · 7.7 KB
/
install.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
-- MySQL dump 10.13 Distrib 5.7.9, for osx10.9 (x86_64)
--
-- Host: localhost Database: robpress
-- ------------------------------------------------------
-- Server version 5.7.9
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `categories`
--
DROP TABLE IF EXISTS `categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `categories`
--
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
INSERT INTO `categories` VALUES (1,'Announcements');
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`blog_id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL,
`message` text NOT NULL,
`created` datetime NOT NULL,
`moderated` tinyint(4) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`,`blog_id`,`moderated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comments`
--
/*!40000 ALTER TABLE `comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `comments` ENABLE KEYS */;
--
-- Table structure for table `post_categories`
--
DROP TABLE IF EXISTS `post_categories`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `post_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`post_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `post_id` (`post_id`,`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `post_categories`
--
/*!40000 ALTER TABLE `post_categories` DISABLE KEYS */;
INSERT INTO `post_categories` VALUES (1,1,1);
/*!40000 ALTER TABLE `post_categories` ENABLE KEYS */;
--
-- Table structure for table `posts`
--
DROP TABLE IF EXISTS `posts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`published` datetime DEFAULT NULL,
`title` varchar(255) NOT NULL,
`summary` text NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `posts`
--
/*!40000 ALTER TABLE `posts` DISABLE KEYS */;
INSERT INTO `posts` VALUES (1,1,NOW(),NOW(),NOW(),'Hello World!','Welcome to your new RobPress Blog!\r\n\r\nYou are about to embark on an amazing journey...','<p>Welcome to your new RobPress Blog!</p>\n\n<p>You are about to embark on an amazing journey...</p>\n\n<p>Here are just some of the exciting features you have to look forward to:</p>\n\n<ul>\n <li>Create your own categories to sort your blog posts into</li>\n <li>Build your own blog posts using a special WYSIWYG editor with ease</li>\n <li>Facilitate user interaction through the innovative comments and moderation system</li>\n <li>Create static pages to expand your site beyond the boundaries of being a blog</li>\n <li>Create administrators to help you run your blog</li>\n <li>Search through blog posts to make it easy to find the information you're looking for</li>\n <li>Upload images and files to your posts easily</li>\n <li>Create user profiles and biographies to create a community around your blog</li>\n</ul>\n\n<p>We hope you enjoy your new blog!</p>\n');
/*!40000 ALTER TABLE `posts` ENABLE KEYS */;
--
-- Table structure for table `settings`
--
DROP TABLE IF EXISTS `settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `settings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) NOT NULL,
`setting` varchar(255) NOT NULL,
`value` text NOT NULL,
`title` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `key` (`setting`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `settings`
--
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
INSERT INTO `settings` VALUES (1,'text','name','RobPress','Blog Name'),(2,'text','front_title','Latest News','Front Page Title'),(3,'checkbox','comments','1','Enable commenting on posts'),(4,'checkbox','moderate','1','Enable comment moderation'),(5,'text','subtitle','Welcome to RobPress','Site Strapline'),(6,'text','email','root@localhost','Administrator Email'),(7,'checkbox','debug','1','Debug mode');
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`displayname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`level` int(11) NOT NULL DEFAULT '0',
`created` datetime NOT NULL,
`bio` text NOT NULL,
`avatar` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'admin','Administrator','root@localhost','$2y$10$UNEL.CwEi3LpsiOh7LueQuBCPTAdC4VMSVfWWoCLo0IeFMyDLXNjK',2,'2000-01-01 00:00:00','<p>I am Administrator!</p>\r\n',''),(2,'test','Test','[email protected]','$2y$10$5yrPLHyaXO7aJY7GI.gFkOGuSdKacQPIIcqf/a3FOwPCeC5n9UbQW',2,NOW(),'','');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--
-- Table structure for table `auth`
--
DROP TABLE IF EXISTS `auth`;
CREATE TABLE `auth` (
`id` integer(11) not null AUTO_INCREMENT,
`selector` char(12),
`validator` char(64),
`user_id` integer(11) not null,
`expires` datetime,
PRIMARY KEY (`id`)
);
--
-- Table structure for table `login_attempts`
--
DROP TABLE IF EXISTS `login_attempts`;
CREATE TABLE `login_attempts` (
`id` integer(11) not null AUTO_INCREMENT,
`ip` char(45) not null,
`attempts` integer(11) not null DEFAULT 0,
`last_attempt` datetime,
PRIMARY KEY (`id`)
);