Mercurial > hg > orthanc
comparison OrthancServer/PrepareDatabase.sql @ 1709:2ad22b2970a2 db-changes
SearchableStudies
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Oct 2015 17:48:30 +0200 |
parents | de1413733c97 |
children | 5ebd6cbb3da8 |
comparison
equal
deleted
inserted
replaced
1708:275780da54ae | 1709:2ad22b2970a2 |
---|---|
22 CREATE TABLE DicomIdentifiers( | 22 CREATE TABLE DicomIdentifiers( |
23 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, | 23 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, |
24 tagGroup INTEGER, | 24 tagGroup INTEGER, |
25 tagElement INTEGER, | 25 tagElement INTEGER, |
26 value TEXT, | 26 value TEXT, |
27 PRIMARY KEY(id, tagGroup, tagElement) | |
28 ); | |
29 | |
30 -- The following table was added in Orthanc 0.9.5 (database v6) | |
31 CREATE TABLE SearchableStudies( | |
32 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, | |
33 tagGroup INTEGER, | |
34 tagElement INTEGER, | |
35 value TEXT, -- assumed to be in upper case | |
27 PRIMARY KEY(id, tagGroup, tagElement) | 36 PRIMARY KEY(id, tagGroup, tagElement) |
28 ); | 37 ); |
29 | 38 |
30 CREATE TABLE Metadata( | 39 CREATE TABLE Metadata( |
31 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, | 40 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, |
84 -- The 3 following indexes were added in Orthanc 0.8.5 (database v5) | 93 -- The 3 following indexes were added in Orthanc 0.8.5 (database v5) |
85 CREATE INDEX DicomIdentifiersIndex1 ON DicomIdentifiers(id); | 94 CREATE INDEX DicomIdentifiersIndex1 ON DicomIdentifiers(id); |
86 CREATE INDEX DicomIdentifiersIndex2 ON DicomIdentifiers(tagGroup, tagElement); | 95 CREATE INDEX DicomIdentifiersIndex2 ON DicomIdentifiers(tagGroup, tagElement); |
87 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY); | 96 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY); |
88 | 97 |
98 -- The 2 following indexes were added in Orthanc 0.9.5 (database v6) | |
99 CREATE INDEX SearchableStudiesIndex1 ON SearchableStudies(id); | |
100 CREATE INDEX SearchableStudiesIndexValues ON SearchableStudies(value COLLATE BINARY); | |
101 | |
89 CREATE INDEX ChangesIndex ON Changes(internalId); | 102 CREATE INDEX ChangesIndex ON Changes(internalId); |
90 | 103 |
91 CREATE TRIGGER AttachedFileDeleted | 104 CREATE TRIGGER AttachedFileDeleted |
92 AFTER DELETE ON AttachedFiles | 105 AFTER DELETE ON AttachedFiles |
93 BEGIN | 106 BEGIN |