update scripts; add sources to languages as an example
parent
a024c59cee
commit
22ae63d693
|
@ -1,6 +1,6 @@
|
||||||
-- -*- mode:sql sql-product:sqlite -*-
|
-- -*- mode:sql sql-product:sqlite -*-
|
||||||
|
|
||||||
INSERT INTO langsrarity (rarirty_id, rarity_name)
|
INSERT INTO langsrarity (rarity_id, rarity_name)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Common'),
|
(1, 'Common'),
|
||||||
(2, 'Uncommon'),
|
(2, 'Uncommon'),
|
||||||
|
@ -9,32 +9,32 @@ VALUES
|
||||||
|
|
||||||
-- TODO These values are from Tables 2-1, 2-2, and 2-3 on page 65 CRB
|
-- TODO These values are from Tables 2-1, 2-2, and 2-3 on page 65 CRB
|
||||||
|
|
||||||
INSERT INTO langs (lang_id, rarity_id, lang, speakers)
|
INSERT INTO langs (lang_id, rarity_id, sources_id, sources_pages, lang, speakers)
|
||||||
VALUES
|
VALUES
|
||||||
-- Common languages
|
-- Common languages
|
||||||
(1, 1, 'Common', 'Humans, dwarves, elves, halflings, and other common ancestries'),
|
(1, 1, 1, '65', 'Common', 'Humans, dwarves, elves, halflings, and other common ancestries'),
|
||||||
(2, 1, 'Draconic', 'Dragons, reptilian humanoids'),
|
(2, 1, 1, '65', 'Draconic', 'Dragons, reptilian humanoids'),
|
||||||
(3, 1, 'Dwarven', 'Dwarves'),
|
(3, 1, 1, '65', 'Dwarven', 'Dwarves'),
|
||||||
(4, 1, 'Elven', 'Elves, half-elves'),
|
(4, 1, 1, '65', 'Elven', 'Elves, half-elves'),
|
||||||
(5, 1, 'Gnomish', 'Gnomes'),
|
(5, 1, 1, '65', 'Gnomish', 'Gnomes'),
|
||||||
(6, 1, 'Goblin', 'Goblins, hobgoblins, bugbears'),
|
(6, 1, 1, '65', 'Goblin', 'Goblins, hobgoblins, bugbears'),
|
||||||
(7, 1, 'Halfling', 'Halflings'),
|
(7, 1, 1, '65', 'Halfling', 'Halflings'),
|
||||||
(8, 1, 'Jotun', 'Giants, ogres, trolls, ettins, cyclopes'),
|
(8, 1, 1, '65', 'Jotun', 'Giants, ogres, trolls, ettins, cyclopes'),
|
||||||
(9, 1, 'Orcish', 'Orcs, half-orcs'),
|
(9, 1, 1, '65', 'Orcish', 'Orcs, half-orcs'),
|
||||||
(10, 1, 'Sylvan', 'Fey, centaurs, plant creatures'),
|
(10, 1,1, '65', 'Sylvan', 'Fey, centaurs, plant creatures'),
|
||||||
(11, 1, 'Undercommon', 'Drow, duergars, xulgaths'),
|
(11, 1,1, '65', 'Undercommon', 'Drow, duergars, xulgaths'),
|
||||||
-- Uncommon languages
|
-- Uncommon languages
|
||||||
(100, 2, 'Abyssal', 'Demons'),
|
(100, 2, 1, '65', 'Abyssal', 'Demons'),
|
||||||
(101, 2, 'Aklo', 'Deros, evil fey, otherworldly monsters'),
|
(101, 2, 1, '65', 'Aklo', 'Deros, evil fey, otherworldly monsters'),
|
||||||
(102, 2, 'Aquan', 'Aquatic creatures, water elemental creatures'),
|
(102, 2, 1, '65', 'Aquan', 'Aquatic creatures, water elemental creatures'),
|
||||||
(103, 2, 'Auran', 'Air elemental creatures, flying creatures'),
|
(103, 2, 1, '65', 'Auran', 'Air elemental creatures, flying creatures'),
|
||||||
(104, 2, 'Celestial', 'Angels'),
|
(104, 2, 1, '65', 'Celestial', 'Angels'),
|
||||||
(105, 2, 'Gnoll', 'Gnolls'),
|
(105, 2, 1, '65', 'Gnoll', 'Gnolls'),
|
||||||
(106, 2, 'Ignan', 'Fire elemental creatures'),
|
(106, 2, 1, '65', 'Ignan', 'Fire elemental creatures'),
|
||||||
(107, 2, 'Infernal', 'Devils'),
|
(107, 2, 1, '65', 'Infernal', 'Devils'),
|
||||||
(108, 2, 'Necril', 'Ghouls, intelligent undead'),
|
(108, 2, 1, '65', 'Necril', 'Ghouls, intelligent undead'),
|
||||||
(109, 2, 'Shadowtongue', 'Nidalese, Shadow Plane creatures'),
|
(109, 2, 1, '65', 'Shadowtongue', 'Nidalese, Shadow Plane creatures'),
|
||||||
(110, 2, 'Terran', 'Earth elemental creatures'),
|
(110, 2, 1, '65', 'Terran', 'Earth elemental creatures'),
|
||||||
-- Secret languages
|
-- Secret languages
|
||||||
(200, 3, 'Druidic', 'Druids');
|
(200, 3, 1, '65', 'Druidic', 'Druids');
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ INSERT INTO sources (sources_id,
|
||||||
first_party,
|
first_party,
|
||||||
ogl_copyright_block)
|
ogl_copyright_block)
|
||||||
VALUES
|
VALUES
|
||||||
|
-- Core Rulebook
|
||||||
(1,
|
(1,
|
||||||
'Pathfinder Core Rulebook (Second Edition)',
|
'Pathfinder Core Rulebook (Second Edition)',
|
||||||
'Core Rulebook',
|
'Core Rulebook',
|
||||||
|
@ -20,6 +21,7 @@ VALUES
|
||||||
'2019-08-01',
|
'2019-08-01',
|
||||||
1,
|
1,
|
||||||
'Open Game License v.1.0a (c) 2000, Wizards of the Coast, Inc.; System Reference Document (c) 2000, Wizards of the Coast, Inc.; Authors: Jonathan Tweet, Monte Cook, and Skip Williams, based on material by E. Gary Gygax and Dave Arneson. Pathfinder Core Rulebook (Second Edition) (c) 2019, Paizo, Inc.; Designers: Logan Bonner, Jason Bulmahn, Stephen Radney-MacFarland, and Mark Seifter.'),
|
'Open Game License v.1.0a (c) 2000, Wizards of the Coast, Inc.; System Reference Document (c) 2000, Wizards of the Coast, Inc.; Authors: Jonathan Tweet, Monte Cook, and Skip Williams, based on material by E. Gary Gygax and Dave Arneson. Pathfinder Core Rulebook (Second Edition) (c) 2019, Paizo, Inc.; Designers: Logan Bonner, Jason Bulmahn, Stephen Radney-MacFarland, and Mark Seifter.'),
|
||||||
|
-- Bestiary 1
|
||||||
(2,
|
(2,
|
||||||
'Pathfinder Bestiary (Second Edition)',
|
'Pathfinder Bestiary (Second Edition)',
|
||||||
'Bestiary',
|
'Bestiary',
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
del pf2.db
|
del pf2.db
|
||||||
|
|
||||||
:: Loading schema
|
:: Loading schema
|
||||||
|
sqlite3 pf2.db < schema/sources.sql
|
||||||
sqlite3 pf2.db < schema/abilityscores.sql
|
sqlite3 pf2.db < schema/abilityscores.sql
|
||||||
sqlite3 pf2.db < schema/sizes.sql
|
sqlite3 pf2.db < schema/sizes.sql
|
||||||
sqlite3 pf2.db < schema/sources.sql
|
|
||||||
sqlite3 pf2.db < schema/langs.sql
|
sqlite3 pf2.db < schema/langs.sql
|
||||||
sqlite3 pf2.db < schema/traits.sql
|
sqlite3 pf2.db < schema/traits.sql
|
||||||
sqlite3 pf2.db < schema/feats.sql
|
sqlite3 pf2.db < schema/feats.sql
|
||||||
|
@ -12,9 +12,11 @@ sqlite3 pf2.db < schema/senses.sql
|
||||||
sqlite3 pf2.db < schema/ancestries.sql
|
sqlite3 pf2.db < schema/ancestries.sql
|
||||||
|
|
||||||
:: Loading data
|
:: Loading data
|
||||||
|
sqlite3 pf2.db < data/sources.sql
|
||||||
sqlite3 pf2.db < data/abilityscores.sql
|
sqlite3 pf2.db < data/abilityscores.sql
|
||||||
sqlite3 pf2.db < data/visions.sql
|
sqlite3 pf2.db < data/senses.sql
|
||||||
sqlite3 pf2.db < data/sizes.sql
|
sqlite3 pf2.db < data/sizes.sql
|
||||||
|
sqlite3 pf2.db < data/langs.sql
|
||||||
sqlite3 pf2.db < data/traits.sql
|
sqlite3 pf2.db < data/traits.sql
|
||||||
sqlite3 pf2.db < data/ancestries.sql
|
sqlite3 pf2.db < data/ancestries.sql
|
||||||
sqlite3 pf2.db < data/heritages.sql
|
sqlite3 pf2.db < data/heritages.sql
|
||||||
|
|
8
gendb.sh
8
gendb.sh
|
@ -1,11 +1,11 @@
|
||||||
rm pf2.db
|
rm pf2.db
|
||||||
echo 'loading schema'
|
echo 'loading schema'
|
||||||
|
echo 'schema/sources.sql'
|
||||||
|
sqlite3 pf2.db < schema/sources.sql
|
||||||
echo 'schema/abilityscores.sql'
|
echo 'schema/abilityscores.sql'
|
||||||
sqlite3 pf2.db < schema/abilityscores.sql
|
sqlite3 pf2.db < schema/abilityscores.sql
|
||||||
echo 'schema/sizes.sql'
|
echo 'schema/sizes.sql'
|
||||||
sqlite3 pf2.db < schema/sizes.sql
|
sqlite3 pf2.db < schema/sizes.sql
|
||||||
echo 'schema/sources.sql'
|
|
||||||
sqlite3 pf2.db < schema/sources.sql
|
|
||||||
echo 'schema/langs.sql'
|
echo 'schema/langs.sql'
|
||||||
sqlite3 pf2.db < schema/langs.sql
|
sqlite3 pf2.db < schema/langs.sql
|
||||||
echo 'schema/traits.sql'
|
echo 'schema/traits.sql'
|
||||||
|
@ -17,12 +17,16 @@ sqlite3 pf2.db < schema/senses.sql
|
||||||
echo 'schema/ancestries.sql'
|
echo 'schema/ancestries.sql'
|
||||||
sqlite3 pf2.db < schema/ancestries.sql
|
sqlite3 pf2.db < schema/ancestries.sql
|
||||||
echo 'loading data'
|
echo 'loading data'
|
||||||
|
echo 'data/sources.sql'
|
||||||
|
sqlite3 pf2.db < data/sources.sql
|
||||||
echo 'data/abilityscores.sql'
|
echo 'data/abilityscores.sql'
|
||||||
sqlite3 pf2.db < data/abilityscores.sql
|
sqlite3 pf2.db < data/abilityscores.sql
|
||||||
echo 'data/visions.sql'
|
echo 'data/visions.sql'
|
||||||
sqlite3 pf2.db < data/visions.sql
|
sqlite3 pf2.db < data/visions.sql
|
||||||
echo 'data/sizes.sql'
|
echo 'data/sizes.sql'
|
||||||
sqlite3 pf2.db < data/sizes.sql
|
sqlite3 pf2.db < data/sizes.sql
|
||||||
|
echo 'data/langs.sql'
|
||||||
|
sqlite3 pf2.db < data/langs.sql
|
||||||
echo 'data/traits.sql'
|
echo 'data/traits.sql'
|
||||||
sqlite3 pf2.db < data/traits.sql
|
sqlite3 pf2.db < data/traits.sql
|
||||||
echo 'data/ancestries.sql'
|
echo 'data/ancestries.sql'
|
||||||
|
|
|
@ -10,8 +10,9 @@ CREATE TABLE langs (
|
||||||
lang TEXT NOT NULL UNIQUE,
|
lang TEXT NOT NULL UNIQUE,
|
||||||
speakers TEXT NOT NULL UNIQUE,
|
speakers TEXT NOT NULL UNIQUE,
|
||||||
rarity_id INTEGER NOT NULL,
|
rarity_id INTEGER NOT NULL,
|
||||||
src_book INTEGER NOT NULL,
|
sources_id INTEGER NOT NULL,
|
||||||
src_pages TEXT NOT NULL,
|
sources_pages TEXT NOT NULL,
|
||||||
FOREIGN KEY (rarity_id) REFERENCES langsrarity(rarity_id)
|
FOREIGN KEY (rarity_id) REFERENCES langsrarity(rarity_id),
|
||||||
|
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
-- -*- mode:sql sql-product:sqlite -*-
|
-- -*- mode:sql sql-product:sqlite -*-
|
||||||
|
|
||||||
|
-- MUST BE CALLED EARLY IN SCRIPT
|
||||||
|
|
||||||
CREATE TABLE sources (
|
CREATE TABLE sources (
|
||||||
sources_id INTEGER PRIMARY KEY,
|
sources_id INTEGER PRIMARY KEY,
|
||||||
sources_full_name TEXT NOT NULL UNIQUE,
|
sources_full_name TEXT NOT NULL UNIQUE,
|
||||||
|
|
Loading…
Reference in New Issue