Commit 1503b5dc authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Sql: No need to define empty update methods

parent e157a674
......@@ -415,9 +415,9 @@ class PrepareDB(object):
for version in allVersions:
currentVersion = self.__currentVersion()
with Internal.db: # transaction
self, 'updateToVersion%s' %
version.replace('.', '_'))()
updateMethodName = 'updateToVersion{}'.format(version.replace('.', '_'))
if hasattr(self, updateMethodName):
getattr(self, updateMethodName)()
Query('UPDATE general SET schemaversion=?', (version,))
logInfo(m18n('Database %1 updated from schema %2 to %3',
Internal.db.path, currentVersion, version), showDialog=True)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment