factor out bulk from armor.sql to bulk.sql

merge-requests/15/head
James Miller 2019-08-07 19:57:23 -05:00
parent c19a8e62f3
commit e249f94469
5 changed files with 31 additions and 26 deletions

View File

@ -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,

19
data/bulk.sql 100644
View File

@ -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);

View File

@ -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'

View File

@ -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,

10
schema/bulk.sql 100644
View File

@ -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)
);