Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/InstallLabelsTable.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 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/InstallLabelsTable.sql Tue Apr 11 16:28:28 2023 +0200 +++ b/OrthancServer/Sources/Database/InstallLabelsTable.sql Tue Apr 11 20:50:43 2023 +0200 @@ -19,10 +19,10 @@ CREATE TABLE Labels( - internalId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, + id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, label TEXT NOT NULL, - PRIMARY KEY(internalId, label) -- Prevents duplicates + PRIMARY KEY(id, label) -- Prevents duplicates ); -CREATE INDEX LabelsIndex1 ON Labels(internalId); +CREATE INDEX LabelsIndex1 ON Labels(id); CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups