From 9b983f9862ac336340803d0870a05a1ed93914ee Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Fri, 19 Apr 2019 09:52:28 -0300 Subject: Add an index --- ganarchy.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ganarchy.py') diff --git a/ganarchy.py b/ganarchy.py index 90e72c7..ed48538 100755 --- a/ganarchy.py +++ b/ganarchy.py @@ -85,6 +85,7 @@ def initdb(): conn = sqlite3.connect(data_home + "/ganarchy.db") c = conn.cursor() c.execute('''CREATE TABLE repos (url TEXT PRIMARY KEY, active INT)''') + c.execute('''CREATE INDEX active_key ON repos (active)''') c.execute('''CREATE TABLE repo_history (entry INTEGER PRIMARY KEY ASC AUTOINCREMENT, url TEXT, count INTEGER, head_commit TEXT)''') c.execute('''CREATE TABLE config (git_commit TEXT, project_title TEXT)''') c.execute('''INSERT INTO config VALUES ('', '')''') -- cgit 1.4.1