Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/InstallLabelsTable.sql @ 5227:988dab8deb1c db-protobuf
"/tools/find" accepts the "WithLabels" and "WithoutLabels" arguments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Apr 2023 09:16:12 +0200 |
parents | d0f7c742d397 |
children | 261ce0ed85e6 |
comparison
equal
deleted
inserted
replaced
5226:49e906a8fea2 | 5227:988dab8deb1c |
---|---|
18 -- along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 -- along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 | 20 |
21 CREATE TABLE Labels( | 21 CREATE TABLE Labels( |
22 internalId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, | 22 internalId INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, |
23 label TEXT | 23 label TEXT NOT NULL, |
24 PRIMARY KEY(internalId, label) -- Prevents duplicates | |
24 ); | 25 ); |
26 | |
27 CREATE INDEX LabelsIndex1 ON Labels(internalId); | |
28 CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups |