Mercurial > hg > orthanc-databases
comparison SQLite/Plugins/SQLiteIndex.cpp @ 238:f033cc039264
new table: "ServerProperties"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Apr 2021 19:33:36 +0200 |
parents | 35598014f140 |
children | a063bbf10a3e |
comparison
equal
deleted
inserted
replaced
237:35598014f140 | 238:f033cc039264 |
---|---|
131 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); | 131 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); |
132 } | 132 } |
133 | 133 |
134 t.Commit(); | 134 t.Commit(); |
135 } | 135 } |
136 | |
137 { | |
138 DatabaseManager::Transaction t(manager, TransactionType_ReadWrite); | |
139 | |
140 if (!t.DoesTableExist("ServerProperties")) | |
141 { | |
142 t.ExecuteMultiLines("CREATE TABLE ServerProperties(server TEXT, " | |
143 "property INTEGER, value TEXT, PRIMARY KEY(server, property))"); | |
144 } | |
145 | |
146 t.Commit(); | |
147 } | |
136 } | 148 } |
137 | 149 |
138 | 150 |
139 SQLiteIndex::SQLiteIndex(OrthancPluginContext* context, | 151 SQLiteIndex::SQLiteIndex(OrthancPluginContext* context, |
140 const std::string& path) : | 152 const std::string& path) : |