Mercurial > hg > orthanc-databases
diff MySQL/Plugins/MySQLIndex.cpp @ 290:2790bafe3b3d
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Jun 2021 08:23:27 +0200 |
parents | 0868500060f3 |
children | 3a52e27a2d80 |
line wrap: on
line diff
--- a/MySQL/Plugins/MySQLIndex.cpp Wed Jun 30 08:19:52 2021 +0200 +++ b/MySQL/Plugins/MySQLIndex.cpp Wed Jun 30 08:23:27 2021 +0200 @@ -138,8 +138,6 @@ * transaction). **/ - int version = 0; - { DatabaseManager::Transaction t(manager, TransactionType_ReadWrite); @@ -156,6 +154,8 @@ ThrowCannotCreateTrigger(); } + int version = 0; + if (!LookupGlobalIntegerProperty(version, manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseSchemaVersion)) { SetGlobalIntegerProperty(manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseSchemaVersion, expectedVersion);