comparison OrthancServer/Upgrade5To6.sql @ 1709:2ad22b2970a2 db-changes

SearchableStudies
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Oct 2015 17:48:30 +0200
parents
children
comparison
equal deleted inserted replaced
1708:275780da54ae 1709:2ad22b2970a2
1 -- This SQLite script updates the version of the Orthanc database from 5 to 6.
2
3
4 -- Add a new table to enable full-text indexed search over studies
5
6 CREATE TABLE SearchableStudies(
7 id INTEGER REFERENCES Resources(internalId) ON DELETE CASCADE,
8 tagGroup INTEGER,
9 tagElement INTEGER,
10 value TEXT, -- assumed to be in upper case
11 PRIMARY KEY(id, tagGroup, tagElement)
12 );
13
14 CREATE INDEX SearchableStudiesIndex1 ON SearchableStudies(id);
15 CREATE INDEX SearchableStudiesIndexValues ON SearchableStudies(value COLLATE BINARY);
16
17
18 -- Change the database version
19 -- The "1" corresponds to the "GlobalProperty_DatabaseSchemaVersion" enumeration
20
21 UPDATE GlobalProperties SET value="6" WHERE property=1;