mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-11 09:25:25 +00:00
tags: mysql create tables if not exists
This commit is contained in:
parent
04fcbad8c5
commit
17bd2cc94c
1 changed files with 3 additions and 3 deletions
|
@ -33,17 +33,17 @@ CREATE TABLE IF NOT EXISTS `users_config` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE tags (
|
||||
CREATE TABLE IF NOT EXISTS `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 (
|
||||
CREATE TABLE IF NOT EXISTS `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;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
Loading…
Reference in a new issue