CREATE TABLE blog id int 255 NOT NULL AUTO_INCREMENT name varchar 64 N

 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
CREATE TABLE `blog` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`translit` varchar(128) NOT NULL,
`closed` set('1','0') CHARACTER SET latin1 NOT NULL,
`owner` int(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE `config` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`template` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT 'default',
`keywords` text CHARACTER SET utf8 NOT NULL,
`description` text CHARACTER SET utf8 NOT NULL,
`limit_new_users` set('1','0') CHARACTER SET utf8 NOT NULL DEFAULT '1',
`anonim_comments` set('1','0') NOT NULL DEFAULT '1',
`index_type` varchar(32) NOT NULL DEFAULT 'new',
`index_blog` int(255) NOT NULL DEFAULT '0',
`index_view` int(255) NOT NULL,
`create_blog_ability` set('1','0') NOT NULL,
`vk_app_id` int(255) NOT NULL,
`vk_app_secret` varchar(128) NOT NULL,
`default_lang` varchar(64) NOT NULL DEFAULT 'en',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
INSERT INTO `config` (`id`, `template`, `keywords`, `description`, `limit_new_users`, `anonim_comments`, `index_type`, `index_blog`, `index_view`, `create_blog_ability`, `vk_app_id`, `vk_app_secret`, `default_lang`) VALUES
(1, 'default', 'osmium, cms, движок, скелет, сайт, создать, бесплатно, бесплатный, блог, блоги, блоговый движок', 'Потом напишу, короче.', '1', '1', 'new', 0, 0, '', 4566489, '0sPx2KENbSGznjGOYdNS', 'en');
CREATE TABLE `topic` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`translit` varchar(128) NOT NULL,
`text` text NOT NULL,
`user` int(255) NOT NULL,
`date` int(255) NOT NULL,
`closed` set('1','0') NOT NULL DEFAULT '0',
`blog` int(255) NOT NULL,
`vote` set('1','0') NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
CREATE TABLE `user` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`login` varchar(32) CHARACTER SET utf8 NOT NULL,
`password` varchar(64) NOT NULL,
`email` varchar(128) CHARACTER SET utf8 NOT NULL,
`name` varchar(32) CHARACTER SET utf8 NOT NULL,
`reg_date` int(255) NOT NULL,
`session` varchar(64) NOT NULL,
`group` int(255) NOT NULL,
`vk_id` varchar(64) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;