mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
[add] tags and tags_entries for mysql & postgresql
This commit is contained in:
parent
f014856424
commit
6bf4702608
@ -32,3 +32,18 @@ CREATE TABLE IF NOT EXISTS `users_config` (
|
||||
`value` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE tags (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`value` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE tags_entries (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`entry_id` int(11) NOT NULL,
|
||||
`tag_id` int(11) NOT NULL,
|
||||
FOREIGN KEY(entry_id) REFERENCES entries(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY(tag_id) REFERENCES tags(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
@ -28,3 +28,14 @@ CREATE TABLE users_config (
|
||||
name varchar(255) NOT NULL,
|
||||
value varchar(255) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE tags (
|
||||
id bigserial primary key,
|
||||
value varchar(255) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE tags_entries (
|
||||
id bigserial primary key,
|
||||
entry_id integer NOT NULL,
|
||||
tag_id integer NOT NULL
|
||||
)
|
Loading…
Reference in New Issue
Block a user