From 11f0f9b2ffe2eb58e3eb9e875a1003bc7302a2d2 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 10 Aug 2017 04:33:15 -0300 Subject: [feature] add namespace to local blobs db table This column will keep track of namespace locally. -- Related: #8882 --- src/leap/soledad/client/_db/blobs.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index 87209570..9e97fe8c 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -485,6 +485,11 @@ def _init_blob_table(conn): "blob_id PRIMARY KEY, " "payload BLOB)") conn.execute(maybe_create) + columns = [row[1] for row in conn.execute("pragma" + " table_info(blobs)").fetchall()] + if 'namespace' not in columns: + # migrate + conn.execute('ALTER TABLE blobs ADD COLUMN namespace TEXT') def _sqlcipherInitFactory(fun): -- cgit v1.2.3