Mercurial > hg > orthanc
comparison OrthancServer/DatabaseWrapper.cpp @ 1712:a7745f3a2cc4 db-changes
integration mainline->db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Oct 2015 17:36:59 +0200 |
parents | 5ebd6cbb3da8 d72cf0c11f42 |
children | 3926e6317a43 |
comparison
equal
deleted
inserted
replaced
1711:5ebd6cbb3da8 | 1712:a7745f3a2cc4 |
---|---|
358 | 358 |
359 if (version_ == 5) | 359 if (version_ == 5) |
360 { | 360 { |
361 LOG(WARNING) << "Upgrading database version from 5 to 6"; | 361 LOG(WARNING) << "Upgrading database version from 5 to 6"; |
362 // No change in the DB schema, the step from version 5 to 6 only | 362 // No change in the DB schema, the step from version 5 to 6 only |
363 // consists in reconstructing the main DICOM tags information. | 363 // consists in reconstructing the main DICOM tags information |
364 // (as more tags got included). | |
364 db_.BeginTransaction(); | 365 db_.BeginTransaction(); |
366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Patient); | |
365 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study); | 367 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Study); |
366 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series); | 368 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Series); |
369 Toolbox::ReconstructMainDicomTags(*this, storageArea, ResourceType_Instance); | |
370 db_.Execute("UPDATE GlobalProperties SET value=\"6\" WHERE property=" + | |
371 boost::lexical_cast<std::string>(GlobalProperty_DatabaseSchemaVersion) + ";"); | |
367 db_.CommitTransaction(); | 372 db_.CommitTransaction(); |
368 version_ = 6; | 373 version_ = 6; |
369 } | 374 } |
370 } | 375 } |
371 | 376 |