From 3704539c0002f256dbbce1835e22e060bde98e03 Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Thu, 29 Aug 2019 21:50:02 -0400 Subject: [PATCH] Added staves.sql Need to add the staves.sql data after the spells are added otherwise the foreign key constraint will fail --- gendb.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gendb.sh b/gendb.sh index a8e4c81..ad71e68 100755 --- a/gendb.sh +++ b/gendb.sh @@ -26,6 +26,7 @@ sqlite3 pf2.db < schema/gear.sql sqlite3 pf2.db < schema/weapons.sql sqlite3 pf2.db < schema/ammunition.sql sqlite3 pf2.db < schema/monsters.sql +sqlite3 pf2.db < schema/staves.sql echo 'loading data' sqlite3 pf2.db < data/sources.sql sqlite3 pf2.db < data/alignments.sql @@ -55,8 +56,10 @@ sqlite3 pf2.db < data/ammunition.sql sqlite3 pf2.db < data/monsters.sql # Comment out the following three lines if you don't want to generate the spell data. cd data/third_party_json -python3 spells.py +python spells.py cd ../.. +# Staves need to be added after spells due to Foreign Key constraint +sqlite3 pf2.db < data/staves.sql # TODO Eventually we will stop relying on the spells.py script and I will have # the actual .sql files for the spell data; I am waiting to see if the