Philipp Hörist pushed to branch master at gajim / gajim

Commits:
020d4754 by Philipp Hörist at 2017-12-17T11:55:38+01:00
Add correct DB migration

Fixes #8806

- - - - -
2001cf4a by Philipp Hörist at 2017-12-17T11:56:04+01:00
Update version to 0.98.2

- - - - -
dfafedc2 by Philipp Hörist at 2017-12-17T12:00:15+01:00
Remove unused DB fields

This field was added but never used

This does not remove the columns from the DB, but doesnt add them
in new migrations.

- - - - -


3 changed files:

- gajim/__init__.py
- gajim/common/check_paths.py
- gajim/common/optparser.py


Changes:

=====================================
gajim/__init__.py
=====================================
--- a/gajim/__init__.py
+++ b/gajim/__init__.py
@@ -1,6 +1,6 @@
 import subprocess
 
-__version__ = "0.98.1"
+__version__ = "0.98.2"
 
 try:
     node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,


=====================================
gajim/common/check_paths.py
=====================================
--- a/gajim/common/check_paths.py
+++ b/gajim/common/check_paths.py
@@ -75,7 +75,6 @@ def create_log_db():
                     subject TEXT,
                     additional_data TEXT DEFAULT '{}',
                     stanza_id TEXT,
-                    mam_id TEXT,
                     encryption TEXT,
                     encryption_state TEXT,
                     marker INTEGER


=====================================
gajim/common/optparser.py
=====================================
--- 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()
@@ -876,7 +878,6 @@ class OptionsParser:
     def update_config_to_016103(self):
         self.call_sql(logger.LOG_DB_PATH,
             '''ALTER TABLE logs ADD COLUMN 'stanza_id' TEXT;
-            ALTER TABLE logs ADD COLUMN 'mam_id' TEXT;
             ALTER TABLE logs ADD COLUMN 'encryption' TEXT;
             ALTER TABLE logs ADD COLUMN 'encryption_state' TEXT;
             ALTER TABLE logs ADD COLUMN 'marker' INTEGER;
@@ -913,3 +914,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')



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/410aee7ba0c51d5bfb4d9f965ac4e87b36684e95...dfafedc21f018027dc540b9b7a7ae27102646dd4

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/410aee7ba0c51d5bfb4d9f965ac4e87b36684e95...dfafedc21f018027dc540b9b7a7ae27102646dd4
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to