comparison MySQL/Plugins/MySQLIndex.cpp @ 53:71eca9b0442a

fix
author am@osimis.io
date Wed, 18 Jul 2018 16:27:21 +0200
parents 17f849b2af34
children 412e30336847
comparison
equal deleted inserted replaced
52:842d4bf9524e 53:71eca9b0442a
103 103
104 int version = 0; 104 int version = 0;
105 if (!LookupGlobalIntegerProperty(version, *db, t, Orthanc::GlobalProperty_DatabaseSchemaVersion) || 105 if (!LookupGlobalIntegerProperty(version, *db, t, Orthanc::GlobalProperty_DatabaseSchemaVersion) ||
106 version != 6) 106 version != 6)
107 { 107 {
108 LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema version: " << version; 108 LOG(ERROR) << "MySQL plugin is incompatible with database schema version: " << version;
109 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 109 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
110 } 110 }
111 111
112 int revision; 112 int revision;
113 if (!LookupGlobalIntegerProperty(revision, *db, t, Orthanc::GlobalProperty_DatabasePatchLevel)) 113 if (!LookupGlobalIntegerProperty(revision, *db, t, Orthanc::GlobalProperty_DatabasePatchLevel))
116 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision); 116 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision);
117 } 117 }
118 118
119 if (revision != 1) 119 if (revision != 1)
120 { 120 {
121 LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema revision: " << revision; 121 LOG(ERROR) << "MySQL plugin is incompatible with database schema revision: " << revision;
122 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 122 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
123 } 123 }
124 124
125 t.Commit(); 125 t.Commit();
126 } 126 }