From 020d4754dfdf562b7ec991465dbef1f9805e43ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <forenjunkie@chello.at>
Date: Sun, 17 Dec 2017 11:55:28 +0100
Subject: [PATCH] Add correct DB migration

Fixes #8806
---
 gajim/common/optparser.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gajim/common/optparser.py b/gajim/common/optparser.py
index 0217a00f38..588cbb5584 100644
--- a/gajim/common/optparser.py
+++ b/gajim/common/optparser.py
@@ -247,6 +247,8 @@ class OptionsParser:
             self.update_config_to_016111()
         if old < [0, 16, 11, 2] and new >= [0, 16, 11, 2]:
             self.update_config_to_016112()
+        if old < [0, 98, 2] and new >= [0, 98, 2]:
+            self.update_config_to_0982()
 
         app.logger.init_vars()
         app.logger.attach_cache_database()
@@ -913,3 +915,12 @@ class OptionsParser:
             '''
         )
         app.config.set('version', '0.16.11.2')
+
+    def update_config_to_0982(self):
+        # This fixes a typo in update_config_to_016112()
+        self.call_sql(logger.LOG_DB_PATH,
+            '''
+            ALTER TABLE logs ADD COLUMN 'account_id' INTEGER;
+            '''
+        )
+        app.config.set('version', '0.98.2')
-- 
GitLab