rearrange gendb.py
parent
848f455ccc
commit
ba8a789585
|
@ -193,19 +193,11 @@ def do_armor(data, conn):
|
||||||
(i['ac_bonus'], i['bulk'], i['category'], i['check_penalty'],
|
(i['ac_bonus'], i['bulk'], i['category'], i['check_penalty'],
|
||||||
i['dex_cap'], i['group'], i['level'], i['name'], i['price_gp'],
|
i['dex_cap'], i['group'], i['level'], i['name'], i['price_gp'],
|
||||||
i['price_text'], i['speed_penalty'], i['strength'], i['descr']))
|
i['price_text'], i['speed_penalty'], i['strength'], i['descr']))
|
||||||
|
|
||||||
stmt = """
|
stmt = """
|
||||||
INSERT INTO armor
|
INSERT INTO armor
|
||||||
(ac_bonus, bulk_id, armor_category_id, check_penalty, dex_cap, grp_id, item_level, name, price_gp, price_text, speed_penalty, strength, descr)
|
(ac_bonus, bulk_id, armor_category_id, check_penalty, dex_cap, grp_id, item_level, name, price_gp, price_text, speed_penalty, strength, descr)
|
||||||
VALUES (?,(SELECT bulk_id FROM bulk WHERE short_name=?),(SELECT armor_category_id FROM armorcategory WHERE armorcategory.name=?),?,?,(SELECT grp_id from armorgroup where armorgroup.name=?),?,?,?,?,?,?,?);
|
VALUES (?,(SELECT bulk_id FROM bulk WHERE short_name=?),(SELECT armor_category_id FROM armorcategory WHERE armorcategory.name=?),?,?,(SELECT grp_id from armorgroup where armorgroup.name=?),?,?,?,?,?,?,?);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# traits in armor
|
|
||||||
# sources in everything
|
|
||||||
# linking it up
|
|
||||||
#
|
|
||||||
|
|
||||||
# stmt = "INSERT INTO senses(name, descr) VALUES (?,?)"
|
|
||||||
try:
|
try:
|
||||||
conn.executemany(stmt, inp_data)
|
conn.executemany(stmt, inp_data)
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
|
@ -215,6 +207,12 @@ def do_armor(data, conn):
|
||||||
else:
|
else:
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
# traits in armor
|
||||||
|
|
||||||
|
# sources in everything
|
||||||
|
# linking it up
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
def do_triggers(data, conn):
|
def do_triggers(data, conn):
|
||||||
table = """
|
table = """
|
||||||
|
|
Loading…
Reference in New Issue