Mercurial > hg > orthanc-databases
comparison MySQL/Plugins/MySQLIndex.cpp @ 109:3f31e3fa5114
MySQL: metadata can store larger values
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Jan 2019 15:14:30 +0100 |
parents | 48d445f756db |
children | 441a472bfd93 |
comparison
equal
deleted
inserted
replaced
108:57c0138d456e | 109:3f31e3fa5114 |
---|---|
138 | 138 |
139 revision = 3; | 139 revision = 3; |
140 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision); | 140 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision); |
141 } | 141 } |
142 | 142 |
143 if (revision != 3) | 143 if (revision == 3) |
144 { | |
145 // Reconfiguration of "Metadata" from TEXT type (up to 64KB) | |
146 // to the LONGTEXT type (up to 4GB). This might be important | |
147 // for applications such as the Osimis Web viewer that stores | |
148 // large amount of metadata. | |
149 // http://book.orthanc-server.com/faq/features.html#central-registry-of-metadata-and-attachments | |
150 db->Execute("ALTER TABLE Metadata MODIFY value LONGTEXT", false); | |
151 | |
152 revision = 4; | |
153 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision); | |
154 } | |
155 | |
156 if (revision != 4) | |
144 { | 157 { |
145 LOG(ERROR) << "MySQL plugin is incompatible with database schema revision: " << revision; | 158 LOG(ERROR) << "MySQL plugin is incompatible with database schema revision: " << revision; |
146 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); | 159 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); |
147 } | 160 } |
148 | 161 |