aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/mysql.sql
diff options
context:
space:
mode:
authortcitworld <thomas.citharet@gmail.com>2014-01-04 12:30:31 -0800
committertcitworld <thomas.citharet@gmail.com>2014-01-04 12:30:31 -0800
commit7f667839764621b5aa01c9db8ce5dde2a29ef18f (patch)
tree93d8241ee81c87e18494325ae02f0589a8e328a2 /install/mysql.sql
parenta84f77d6ba15a64ff00453f5d5190c021ce460ed (diff)
parent2abcccb37180c17318f5226f5d4bc28f30b621ea (diff)
downloadwallabag-7f667839764621b5aa01c9db8ce5dde2a29ef18f.tar.gz
wallabag-7f667839764621b5aa01c9db8ce5dde2a29ef18f.tar.zst
wallabag-7f667839764621b5aa01c9db8ce5dde2a29ef18f.zip
Merge pull request #1 from inthepoche/dev
Dev
Diffstat (limited to 'install/mysql.sql')
-rw-r--r--install/mysql.sql23
1 files changed, 19 insertions, 4 deletions
diff --git a/install/mysql.sql b/install/mysql.sql
index cb232a84..d16381d8 100644
--- a/install/mysql.sql
+++ b/install/mysql.sql
@@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS `config` (
3 `name` varchar(255) NOT NULL, 3 `name` varchar(255) NOT NULL,
4 `value` varchar(255) NOT NULL, 4 `value` varchar(255) NOT NULL,
5 PRIMARY KEY (`id`) 5 PRIMARY KEY (`id`)
6) ENGINE=InnoDB DEFAULT CHARSET=latin1; 6) ENGINE=InnoDB DEFAULT CHARSET=utf8;
7 7
8CREATE TABLE IF NOT EXISTS `entries` ( 8CREATE TABLE IF NOT EXISTS `entries` (
9 `id` int(11) NOT NULL AUTO_INCREMENT, 9 `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `entries` (
14 `content` blob NOT NULL, 14 `content` blob NOT NULL,
15 `user_id` int(11) NOT NULL, 15 `user_id` int(11) NOT NULL,
16 PRIMARY KEY (`id`) 16 PRIMARY KEY (`id`)
17) ENGINE=InnoDB DEFAULT CHARSET=latin1; 17) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18 18
19CREATE TABLE IF NOT EXISTS `users` ( 19CREATE TABLE IF NOT EXISTS `users` (
20 `id` int(11) NOT NULL AUTO_INCREMENT, 20 `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `users` (
23 `name` int(255) NOT NULL, 23 `name` int(255) NOT NULL,
24 `email` varchar(255) NOT NULL, 24 `email` varchar(255) NOT NULL,
25 PRIMARY KEY (`id`) 25 PRIMARY KEY (`id`)
26) ENGINE=InnoDB DEFAULT CHARSET=latin1; 26) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27 27
28CREATE TABLE IF NOT EXISTS `users_config` ( 28CREATE TABLE IF NOT EXISTS `users_config` (
29 `id` int(11) NOT NULL AUTO_INCREMENT, 29 `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -31,4 +31,19 @@ CREATE TABLE IF NOT EXISTS `users_config` (
31 `name` varchar(255) NOT NULL, 31 `name` varchar(255) NOT NULL,
32 `value` varchar(255) NOT NULL, 32 `value` varchar(255) NOT NULL,
33 PRIMARY KEY (`id`) 33 PRIMARY KEY (`id`)
34) ENGINE=InnoDB DEFAULT CHARSET=latin1; \ No newline at end of file 34) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
36CREATE TABLE IF NOT EXISTS `tags` (
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
42CREATE TABLE IF NOT EXISTS `tags_entries` (
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`)
49) ENGINE=InnoDB DEFAULT CHARSET=utf8;