Browse Source

Added primary-colum to page_tag, formatted sql queries

master
Gisle Aune 7 years ago
parent
commit
eb8c8642b5
  1. 1
      tables.sql

1
tables.sql

@ -45,6 +45,7 @@ CREATE TABLE tag (
CREATE TABLE page_tag ( CREATE TABLE page_tag (
`page_id` CHAR(16) NOT NULL, `page_id` CHAR(16) NOT NULL,
`tag_id` CHAR(16) NOT NULL, `tag_id` CHAR(16) NOT NULL,
`primary` BOOLEAN NOT NULL,
PRIMARY KEY (`page_id`, `tag_id`), PRIMARY KEY (`page_id`, `tag_id`),
FOREIGN KEY (`page_id`) REFERENCES page(`id`) ON DELETE CASCADE, FOREIGN KEY (`page_id`) REFERENCES page(`id`) ON DELETE CASCADE,

Loading…
Cancel
Save