comparison OrthancServer/PrepareDatabase.sql @ 1711:5ebd6cbb3da8 db-changes

Backed out changeset 2ad22b2970a2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Oct 2015 17:36:07 +0200
parents 2ad22b2970a2
children
comparison
equal deleted inserted replaced
1709:2ad22b2970a2 1711:5ebd6cbb3da8
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
36 PRIMARY KEY(id, tagGroup, tagElement) 27 PRIMARY KEY(id, tagGroup, tagElement)
37 ); 28 );
38 29
39 CREATE TABLE Metadata( 30 CREATE TABLE Metadata(
40 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, 31 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE,
93 -- The 3 following indexes were added in Orthanc 0.8.5 (database v5) 84 -- The 3 following indexes were added in Orthanc 0.8.5 (database v5)
94 CREATE INDEX DicomIdentifiersIndex1 ON DicomIdentifiers(id); 85 CREATE INDEX DicomIdentifiersIndex1 ON DicomIdentifiers(id);
95 CREATE INDEX DicomIdentifiersIndex2 ON DicomIdentifiers(tagGroup, tagElement); 86 CREATE INDEX DicomIdentifiersIndex2 ON DicomIdentifiers(tagGroup, tagElement);
96 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY); 87 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY);
97 88
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
102 CREATE INDEX ChangesIndex ON Changes(internalId); 89 CREATE INDEX ChangesIndex ON Changes(internalId);
103 90
104 CREATE TRIGGER AttachedFileDeleted 91 CREATE TRIGGER AttachedFileDeleted
105 AFTER DELETE ON AttachedFiles 92 AFTER DELETE ON AttachedFiles
106 BEGIN 93 BEGIN