Skip to content
Snippets Groups Projects
Commit f2152708 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: fix sql schema

parent f0533228
No related branches found
No related tags found
2 merge requests!59FIX: if multiple updates for one entity exist, the retrieve would result in an...,!56F insert auth
Pipeline #28072 passed
...@@ -330,7 +330,7 @@ class UpdateCache(AbstractCache): ...@@ -330,7 +330,7 @@ class UpdateCache(AbstractCache):
""" """
def get_cache_schema_version(self): def get_cache_schema_version(self):
return 2 return 3
def get_default_file_name(self): def get_default_file_name(self):
return "/tmp/crawler_update_cache.db" return "/tmp/crawler_update_cache.db"
...@@ -382,8 +382,8 @@ class UpdateCache(AbstractCache): ...@@ -382,8 +382,8 @@ class UpdateCache(AbstractCache):
def create_cache(self): def create_cache(self):
""" initialize the cache """ """ initialize the cache """
self.run_sql_commands([ self.run_sql_commands([
('''CREATE TABLE updates (olddigest TEXT PRIMARY KEY, newdigest TEXT, oldrep TEXT, ('''CREATE TABLE updates (olddigest TEXT, newdigest TEXT, oldrep TEXT,
newrep TEXT, run_id TEXT)''',), newrep TEXT, run_id TEXT, primary key (olddigest, newdigest, run_id))''',),
('''CREATE TABLE version (schema INTEGER)''',), ('''CREATE TABLE version (schema INTEGER)''',),
("INSERT INTO version VALUES (?)", (self.get_cache_schema_version(),))]) ("INSERT INTO version VALUES (?)", (self.get_cache_schema_version(),))])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment