diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-20 07:42:20 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-20 07:42:20 +0100 |
commit | 9a5c1bc62a224b0718b93f7e302692526d49b9b0 (patch) | |
tree | 7f06c0e106f67065e70036b388838538ae2db525 /bin/mysql.sql | |
parent | 6ad93dff69d7c2beb2196e73f641e6484fccbeb7 (diff) | |
download | wallabag-9a5c1bc62a224b0718b93f7e302692526d49b9b0.tar.gz wallabag-9a5c1bc62a224b0718b93f7e302692526d49b9b0.tar.zst wallabag-9a5c1bc62a224b0718b93f7e302692526d49b9b0.zip |
move install files into bin folder
Diffstat (limited to 'bin/mysql.sql')
-rw-r--r-- | bin/mysql.sql | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/bin/mysql.sql b/bin/mysql.sql new file mode 100644 index 00000000..1b65cd35 --- /dev/null +++ b/bin/mysql.sql | |||
@@ -0,0 +1,49 @@ | |||
1 | CREATE 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`) | ||
6 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
7 | |||
8 | CREATE 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, | ||
12 | `is_read` tinyint(1) NOT NULL DEFAULT 0, | ||
13 | `is_fav` tinyint(1) NOT NULL DEFAULT 0, | ||
14 | `content` blob NOT NULL, | ||
15 | `user_id` int(11) NOT NULL, | ||
16 | PRIMARY KEY (`id`) | ||
17 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
18 | |||
19 | CREATE 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, | ||
23 | `name` varchar(255) NOT NULL, | ||
24 | `email` varchar(255) NOT NULL, | ||
25 | PRIMARY KEY (`id`) | ||
26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
27 | |||
28 | CREATE 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`) | ||
34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
35 | |||
36 | CREATE 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=utf8mb4; | ||
41 | |||
42 | CREATE 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=utf8mb4; | ||