Mercurial > hg > orthanc-postgresql
changeset 81:63187f392416
fix
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 29 Oct 2015 12:24:38 +0100 |
| parents | 2605ebf75cf8 |
| children | 64fd76a722d3 |
| files | IndexPlugin/PostgreSQLWrapper.cpp |
| diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/IndexPlugin/PostgreSQLWrapper.cpp Thu Oct 29 12:01:30 2015 +0100 +++ b/IndexPlugin/PostgreSQLWrapper.cpp Thu Oct 29 12:24:38 2015 +0100 @@ -1504,6 +1504,10 @@ if (version == 5 && targetVersion == 6) { + version_ = 6; // Must be here, otherwise calls to + // SetMainDicomTag() during the reconstruction of + // the DICOM tags will fail as the column type + // has been altered connection_->Execute("ALTER TABLE MainDicomTags ALTER COLUMN value TYPE TEXT"); connection_->Execute("ALTER TABLE DicomIdentifiers ALTER COLUMN value TYPE TEXT"); OrthancPluginReconstructMainDicomTags(context_, storageArea, OrthancPluginResourceType_Patient); @@ -1512,7 +1516,6 @@ OrthancPluginReconstructMainDicomTags(context_, storageArea, OrthancPluginResourceType_Instance); connection_->Execute("DELETE FROM GlobalProperties WHERE property=1"); connection_->Execute("INSERT INTO GlobalProperties VALUES (1, '6');"); - version_ = 6; return; // Success }
