diff --git a/data/armor.sql b/data/armor.sql index d35684f..cfb3a94 100644 --- a/data/armor.sql +++ b/data/armor.sql @@ -1,21 +1,4 @@ --- TODO update sizes table with a FK to bulk to get the data from the table on --- pg 272 CRB -INSERT INTO bulk ( - bulk_id, - sources_id, - sources_pages, - short_name, - long_name, - numerical) -VALUES - (1, 1, '271-72', '-', 'Negligible', 0.0), - (2, 1, '271-72', 'L', 'Light', 0.1), - (3, 1, '271-72', '1', 'One', 1.0), - (4, 1, '271-72', '2', 'Two', 2.0), - (5, 1, '271-72', '3', 'Three', 3.0), - (6, 1, '271-72', '4', 'Four', 4.0), - (7, 1, '271-72', '5', 'Five', 5.0); INSERT INTO armorgroup ( grp_id, diff --git a/data/bulk.sql b/data/bulk.sql new file mode 100644 index 0000000..f2e03a7 --- /dev/null +++ b/data/bulk.sql @@ -0,0 +1,19 @@ + +-- TODO update sizes table with a FK to bulk to get the data from the table on +-- pg 272 CRB +INSERT INTO bulk ( + bulk_id, + sources_id, + sources_pages, + short_name, + long_name, + numerical) +VALUES + (1, 1, '271-72', '-', 'Negligible', 0.0), + (2, 1, '271-72', 'L', 'Light', 0.1), + (3, 1, '271-72', '1', 'One', 1.0), + (4, 1, '271-72', '2', 'Two', 2.0), + (5, 1, '271-72', '3', 'Three', 3.0), + (6, 1, '271-72', '4', 'Four', 4.0), + (7, 1, '271-72', '5', 'Five', 5.0); + diff --git a/gendb.sh b/gendb.sh index c01acc3..0744d49 100755 --- a/gendb.sh +++ b/gendb.sh @@ -6,6 +6,7 @@ sqlite3 pf2.db < schema/sources.sql sqlite3 pf2.db < schema/backgrounds.sql # echo 'schema/abilityscores.sql' sqlite3 pf2.db < schema/abilityscores.sql +sqlite3 pf2.db < schema/bulk.sql # echo 'schema/sizes.sql' sqlite3 pf2.db < schema/sizes.sql # echo 'schema/langs.sql' @@ -26,6 +27,7 @@ sqlite3 pf2.db < data/sources.sql sqlite3 pf2.db < data/backgrounds.sql # echo 'data/abilityscores.sql' sqlite3 pf2.db < data/abilityscores.sql +sqlite3 pf2.db < data/bulk.sql # echo 'data/senses.sql' sqlite3 pf2.db < data/senses.sql # echo 'data/sizes.sql' diff --git a/schema/armor.sql b/schema/armor.sql index d097700..6185163 100644 --- a/schema/armor.sql +++ b/schema/armor.sql @@ -1,12 +1,3 @@ -CREATE TABLE bulk ( - bulk_id INTEGER PRIMARY KEY, - sources_id INTEGER NOT NULL, - sources_pages TEXT NOT NULL, - short_name TEXT NOT NULL, - long_name TEXT NOT NULL, - numerical FLOAT NOT NULL, - FOREIGN KEY (sources_id) REFERENCES sources(sources_id) -); CREATE TABLE armorgroup ( grp_id INTEGER PRIMARY KEY, diff --git a/schema/bulk.sql b/schema/bulk.sql new file mode 100644 index 0000000..b301978 --- /dev/null +++ b/schema/bulk.sql @@ -0,0 +1,10 @@ +CREATE TABLE bulk ( + bulk_id INTEGER PRIMARY KEY, + sources_id INTEGER NOT NULL, + sources_pages TEXT NOT NULL, + short_name TEXT NOT NULL, + long_name TEXT NOT NULL, + numerical FLOAT NOT NULL, + FOREIGN KEY (sources_id) REFERENCES sources(sources_id) +); +