diff --git a/data/yaml/gendb.py b/data/yaml/gendb.py index 1d99a2f..69d07c2 100644 --- a/data/yaml/gendb.py +++ b/data/yaml/gendb.py @@ -96,7 +96,8 @@ CREATE TABLE sourceentry_background ( srcentrydata.append((abbr, page_start, page_stop)) stmt = "INSERT INTO background(name, descr, is_comty_use, is_specific_to_adv) VALUES (?,?,?,?)" try: - conn.execute(stmt, (i['name'], i['descr'], i['is_comty_use'], i['is_specific_to_adv'])) + conn.execute(stmt, (i['name'], i['descr'], i['is_comty_use'], + i['is_specific_to_adv'])) except: print("Error creating background") else: @@ -107,6 +108,7 @@ CREATE TABLE sourceentry_background ( # TODO link_sourceentry_backgrounds(i['name'], srcentrydata, conn) + def link_sourceentry_backgrounds(name, srcentrydata, conn): stmt = """ INSERT INTO sourceentry_background (sourceentry_id, background_id) @@ -129,6 +131,7 @@ INSERT INTO sourceentry_background (sourceentry_id, background_id) else: conn.commit() + def do_conditions(data, conn): # MAKE THE 2 TABLES table = """