Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
5255:f783b99e4738 | 5256:261ce0ed85e6 |
---|---|
17 -- You should have received a copy of the GNU General Public License | 17 -- You should have received a copy of the GNU General Public License |
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 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE, |
23 label TEXT NOT NULL, | 23 label TEXT NOT NULL, |
24 PRIMARY KEY(internalId, label) -- Prevents duplicates | 24 PRIMARY KEY(id, label) -- Prevents duplicates |
25 ); | 25 ); |
26 | 26 |
27 CREATE INDEX LabelsIndex1 ON Labels(internalId); | 27 CREATE INDEX LabelsIndex1 ON Labels(id); |
28 CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups | 28 CREATE INDEX LabelsIndex2 ON Labels(label); -- This index allows efficient lookups |