Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/PrepareDatabase.sql @ 5256:261ce0ed85e6 db-protobuf
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Apr 2023 20:50:43 +0200 |
parents | 988dab8deb1c |
children | 48b8dae6dc77 |
comparison
equal
deleted
inserted
replaced
5255:f783b99e4738 | 5256:261ce0ed85e6 |
---|---|
91 patientId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE | 91 patientId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE |
92 ); | 92 ); |
93 | 93 |
94 -- New in Orthanc 1.12.0 | 94 -- New in Orthanc 1.12.0 |
95 CREATE TABLE Labels( | 95 CREATE TABLE Labels( |
96 internalId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, | 96 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, |
97 label TEXT NOT NULL, | 97 label TEXT NOT NULL, |
98 PRIMARY KEY(internalId, label) -- Prevents duplicates | 98 PRIMARY KEY(id, label) -- Prevents duplicates |
99 ); | 99 ); |
100 | 100 |
101 CREATE INDEX ChildrenIndex ON Resources(parentId); | 101 CREATE INDEX ChildrenIndex ON Resources(parentId); |
102 CREATE INDEX PublicIndex ON Resources(publicId); | 102 CREATE INDEX PublicIndex ON Resources(publicId); |
103 CREATE INDEX ResourceTypeIndex ON Resources(resourceType); | 103 CREATE INDEX ResourceTypeIndex ON Resources(resourceType); |
114 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY); | 114 CREATE INDEX DicomIdentifiersIndexValues ON DicomIdentifiers(value COLLATE BINARY); |
115 | 115 |
116 CREATE INDEX ChangesIndex ON Changes(internalId); | 116 CREATE INDEX ChangesIndex ON Changes(internalId); |
117 | 117 |
118 -- New in Orthanc 1.12.0 | 118 -- New in Orthanc 1.12.0 |
119 CREATE INDEX LabelsIndex1 ON Labels(internalId); | 119 CREATE INDEX LabelsIndex1 ON Labels(id); |
120 CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups | 120 CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups |
121 | 121 |
122 CREATE TRIGGER AttachedFileDeleted | 122 CREATE TRIGGER AttachedFileDeleted |
123 AFTER DELETE ON AttachedFiles | 123 AFTER DELETE ON AttachedFiles |
124 BEGIN | 124 BEGIN |