run yapf on gendb.py
parent
1031404280
commit
00d07f7ab7
|
@ -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 = """
|
||||
|
|
Loading…
Reference in New Issue