Skip to content

Commit

Permalink
db version fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DoTheEvo committed Sep 17, 2015
1 parent 39d62e7 commit e16bf99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions angrysearch_update_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def new_database(table):
cur.execute('''CREATE VIRTUAL TABLE angry_table
USING fts4(directory, path, size, date)''')

cur.execute('''PRAGMA user_version = 1;''')

for x in table:
cur.execute('''INSERT INTO angry_table VALUES (?, ?, ?, ?)''',
(x[0], x[1], x[2], x[3]))
Expand All @@ -147,6 +149,8 @@ def new_database_lite(table):
cur.execute('''CREATE VIRTUAL TABLE angry_table
USING fts4(directory, path)''')

cur.execute('''PRAGMA user_version = 1;''')

for x in table:
cur.execute('''INSERT INTO angry_table VALUES (?, ?)''',
(x[0], x[1]))
Expand Down

0 comments on commit e16bf99

Please sign in to comment.