aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/mysql.sql
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-19 05:28:22 -0800
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-19 05:28:22 -0800
commit5c8d438c08f12e20e237e0c9a9ea9cb63b58fa1d (patch)
tree366efac7fdc2cf3eb059878b2644299e06159495 /install/mysql.sql
parent04fcbad8c50956336819f2b25db8298d50b5b800 (diff)
parent17bd2cc94c8558c754c05920938f7386f88b2d9a (diff)
downloadwallabag-5c8d438c08f12e20e237e0c9a9ea9cb63b58fa1d.tar.gz
wallabag-5c8d438c08f12e20e237e0c9a9ea9cb63b58fa1d.tar.zst
wallabag-5c8d438c08f12e20e237e0c9a9ea9cb63b58fa1d.zip
Merge pull request #360 from DmitrySandalov/dev
tags: mysql create tables if not exists
Diffstat (limited to 'install/mysql.sql')
-rw-r--r--install/mysql.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/install/mysql.sql b/install/mysql.sql
index 66c4bb31..d16381d8 100644
--- a/install/mysql.sql
+++ b/install/mysql.sql
@@ -33,17 +33,17 @@ CREATE TABLE IF NOT EXISTS `users_config` (
33 PRIMARY KEY (`id`) 33 PRIMARY KEY (`id`)
34) ENGINE=InnoDB DEFAULT CHARSET=utf8; 34) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35 35
36CREATE TABLE tags ( 36CREATE TABLE IF NOT EXISTS `tags` (
37 `id` int(11) NOT NULL AUTO_INCREMENT, 37 `id` int(11) NOT NULL AUTO_INCREMENT,
38 `value` varchar(255) NOT NULL, 38 `value` varchar(255) NOT NULL,
39 PRIMARY KEY (`id`) 39 PRIMARY KEY (`id`)
40) ENGINE=InnoDB DEFAULT CHARSET=utf8; 40) ENGINE=InnoDB DEFAULT CHARSET=utf8;
41 41
42CREATE TABLE tags_entries ( 42CREATE TABLE IF NOT EXISTS `tags_entries` (
43 `id` int(11) NOT NULL AUTO_INCREMENT, 43 `id` int(11) NOT NULL AUTO_INCREMENT,
44 `entry_id` int(11) NOT NULL, 44 `entry_id` int(11) NOT NULL,
45 `tag_id` int(11) NOT NULL, 45 `tag_id` int(11) NOT NULL,
46 FOREIGN KEY(entry_id) REFERENCES entries(id) ON DELETE CASCADE, 46 FOREIGN KEY(entry_id) REFERENCES entries(id) ON DELETE CASCADE,
47 FOREIGN KEY(tag_id) REFERENCES tags(id) ON DELETE CASCADE, 47 FOREIGN KEY(tag_id) REFERENCES tags(id) ON DELETE CASCADE,
48 PRIMARY KEY (`id`) 48 PRIMARY KEY (`id`)
49) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file 49) ENGINE=InnoDB DEFAULT CHARSET=utf8;