]> git.immae.eu Git - github/wallabag/wallabag.git/blame - install/mysql.sql
config.inc.php.new renamed in config.inc.default.php
[github/wallabag/wallabag.git] / install / mysql.sql
CommitLineData
580d60b9
NL
1CREATE TABLE IF NOT EXISTS `config` (
2 `id` int(11) NOT NULL AUTO_INCREMENT,
3 `name` varchar(255) NOT NULL,
4 `value` varchar(255) NOT NULL,
5 PRIMARY KEY (`id`)
33fe6a46 6) ENGINE=InnoDB DEFAULT CHARSET=utf8;
580d60b9
NL
7
8CREATE TABLE IF NOT EXISTS `entries` (
9 `id` int(11) NOT NULL AUTO_INCREMENT,
10 `title` varchar(255) NOT NULL,
11 `url` varchar(255) NOT NULL,
9ffce01e
P
12 `is_read` tinyint(1) NOT NULL DEFAULT 0,
13 `is_fav` tinyint(1) NOT NULL DEFAULT 0,
580d60b9
NL
14 `content` blob NOT NULL,
15 `user_id` int(11) NOT NULL,
16 PRIMARY KEY (`id`)
33fe6a46 17) ENGINE=InnoDB DEFAULT CHARSET=utf8;
580d60b9
NL
18
19CREATE TABLE IF NOT EXISTS `users` (
20 `id` int(11) NOT NULL AUTO_INCREMENT,
21 `username` varchar(255) NOT NULL,
22 `password` varchar(255) NOT NULL,
9ffce01e 23 `name` varchar(255) NOT NULL,
580d60b9
NL
24 `email` varchar(255) NOT NULL,
25 PRIMARY KEY (`id`)
33fe6a46 26) ENGINE=InnoDB DEFAULT CHARSET=utf8;
580d60b9
NL
27
28CREATE TABLE IF NOT EXISTS `users_config` (
29 `id` int(11) NOT NULL AUTO_INCREMENT,
30 `user_id` int(11) NOT NULL,
31 `name` varchar(255) NOT NULL,
32 `value` varchar(255) NOT NULL,
33 PRIMARY KEY (`id`)
6bf47026
NL
34) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
17bd2cc9 36CREATE TABLE IF NOT EXISTS `tags` (
6bf47026
NL
37 `id` int(11) NOT NULL AUTO_INCREMENT,
38 `value` varchar(255) NOT NULL,
39 PRIMARY KEY (`id`)
40) ENGINE=InnoDB DEFAULT CHARSET=utf8;
41
17bd2cc9 42CREATE TABLE IF NOT EXISTS `tags_entries` (
6bf47026
NL
43 `id` int(11) NOT NULL AUTO_INCREMENT,
44 `entry_id` int(11) NOT NULL,
45 `tag_id` int(11) NOT NULL,
46 FOREIGN KEY(entry_id) REFERENCES entries(id) ON DELETE CASCADE,
47 FOREIGN KEY(tag_id) REFERENCES tags(id) ON DELETE CASCADE,
48 PRIMARY KEY (`id`)
17bd2cc9 49) ENGINE=InnoDB DEFAULT CHARSET=utf8;