Skip to content
Snippets Groups Projects
Commit a83e9dcc authored by Tomáš Kořistka's avatar Tomáš Kořistka
Browse files

Updated db to ensure document-term unique pairing

parent 24b01f07
No related branches found
No related tags found
No related merge requests found
...@@ -17,5 +17,6 @@ CREATE TABLE TermDocumentOccurrence ...@@ -17,5 +17,6 @@ CREATE TABLE TermDocumentOccurrence
Document_id INTEGER UNSIGNED NOT NULL, Document_id INTEGER UNSIGNED NOT NULL,
count INTEGER UNSIGNED NOT NULL, count INTEGER UNSIGNED NOT NULL,
FOREIGN KEY (Document_id) REFERENCES Document (id), FOREIGN KEY (Document_id) REFERENCES Document (id),
FOREIGN KEY (Term_id) REFERENCES Term (id) FOREIGN KEY (Term_id) REFERENCES Term (id),
UNIQUE (Term_id, Document_id) ON CONFLICT REPLACE
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment