· 9 years ago · Nov 21, 2016, 09:08 PM
1DROP TABLE IF EXISTS `images`;
2CREATE TABLE `images` (
3 `id` int(11) NOT NULL AUTO_INCREMENT,
4 `src` text NOT NULL,
5 `uploader_id` int(11) NOT NULL,
6 `content_id` int(11) NOT NULL,
7 `main` enum('0','1') DEFAULT '0',
8 `timestamp` text NOT NULL,
9 PRIMARY KEY (`id`)
10) ENGINE=InnoDB DEFAULT CHARSET=latin1;
11
12DROP TABLE IF EXISTS `articles`;
13CREATE TABLE `articles` (
14 `id` int(11) NOT NULL AUTO_INCREMENT,
15 `title` varchar(255) NOT NULL,
16 `breadtext` text NOT NULL,
17 `category` varchar(255) NOT NULL,
18 `kommun` varchar(255) NOT NULL,
19 `mainimage` text NOT NULL,
20 `timestamp` text NOT NULL,
21 `user_type` enum('företag','privat') DEFAULT 'privat',
22 `views` int(11) NOT NULL DEFAULT '0',
23 PRIMARY KEY (`id`),
24 FULLTEXT KEY `FullText` (`title`,`breadtext`),
25 FULLTEXT KEY `IndexName` (`title`)
26) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;