From 6c68db9ae0278b0c5e886076280a8f7f23312ff2 Mon Sep 17 00:00:00 2001 From: tesfagabir Date: Sat, 9 Nov 2013 15:19:42 +0400 Subject: [PATCH] Date: 04/11/2013 Pragma table modified. --- src/class_sqlThread.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 6d1aad8f..cf9c841c 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -108,13 +108,13 @@ class sqlThread(threading.Thread): # and stores them in inbox_columns and sent_columns. # It then stores the starred column information in inbox_starred and sent_starred - # 1. For inbox table + # 1. For inbox table, check if starred column is already created. inbox_columns = self.cur.execute("PRAGMA table_info(inbox)") - inbox_starred = [(a, b, c, d, e, f) for a, b, c, d, e, f in inbox_columns if b == 'starred' ] + inbox_starred = [(col_num, col_name, c, d, e, f) for col_num, col_name, c, d, e, f in inbox_columns if col_name == 'starred' ] - # 2. For sent table + # 2. For sent table, check if starred column is already created. sent_columns = self.cur.execute("PRAGMA table_info(sent)") - sent_starred = [(a, b, c, d, e, f) for a, b, c, d, e, f in sent_columns if b == 'starred'] + sent_starred = [(col_num, col_name, c, d, e, f) for col_num, col_name, c, d, e, f in sent_columns if col_name == 'starred'] #If the column is not already added to the inbox table, ALTER TABLE command is called. if inbox_starred.__len__() == 0: