Ancestries

source_entries
Brian Haley 2019-09-04 19:51:43 -04:00
parent df5edb5d94
commit 7be2365598
2 changed files with 48 additions and 9 deletions

View File

@ -7,14 +7,14 @@ a field with markdown formatted text. Need to think on it. */
PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned
-- on PER CONNECTION -- on PER CONNECTION
INSERT INTO ancestries (ancestry_id, short_name, flavor_text, hp, size_id, speed, vision_id,sources_id,sources_pages) INSERT INTO ancestries (ancestry_id, short_name, flavor_text, hp, size_id, speed, vision_id)
VALUES VALUES
(1, 'Dwarf', 'TODO', 10, 3, 20, 1,1,'35'), (1, 'Dwarf', 'TODO', 10, 3, 20, 1),
(2, 'Elf', 'TODO', 6, 3, 30, 2,1,'39'), (2, 'Elf', 'TODO', 6, 3, 30, 2),
(3, 'Gnome', 'TODO', 8, 2, 25, 2,1,'43'), (3, 'Gnome', 'TODO', 8, 2, 25, 2),
(4, 'Goblin', 'TODO', 6, 2, 25, 1,1,'47'), (4, 'Goblin', 'TODO', 6, 2, 25, 1),
(5, 'Halfling', 'TODO', 6, 2, 25, 3,1,'51'), (5, 'Halfling', 'TODO', 6, 2, 25, 3),
(6, 'Human', 'TODO', 8, 3, 25, 4,1,'55'), (6, 'Human', 'TODO', 8, 3, 25, 4),
(7, 'Half-Elf', 'TODO', 8, 3, 25, 4,1,'55'), (7, 'Half-Elf', 'TODO', 8, 3, 25, 4,1,'55'),
(8, 'Half-Orc', 'TODO', 8, 3, 25, 4,1,'55'); (8, 'Half-Orc', 'TODO', 8, 3, 25, 4,1,'55');
@ -81,3 +81,35 @@ VALUES
(8,86), (8,86),
(8,182), (8,182),
(8,84); (8,84);
INSERT INTO sourceentries (
sourceentry_id
,sources_id
,page_start
,page_stop
)
VALUES
-- 300 to 399 is reserved for CRB ancestries --
(300, 1, 35, 35) -- Dwarf --
,(301, 1, 39, 39) -- Elf --
,(302, 1, 43, 43) -- Gnome --
,(303, 1, 47, 47) -- Goblin --
,(304, 1, 51, 51) -- Halfling --
,(305, 1, 55, 55) -- Human, Half-elf, Half-orc --
;
INSERT INTO ancestries_sourceentries (
id,
,ancestry_id
,sourceentry_id
)
VALUES
(1, 1, 300) -- Dwarf --
,(2, 2, 301) -- Elf --
,(3, 3, 302) -- Gnome --
,(4, 4, 303) -- Goblin --
,(5, 5, 304) -- Halfling --
,(6, 6, 305) -- Human --
,(7, 7, 305) -- Half-elf --
,(8, 8, 305) -- Half-orc --
;

View File

@ -10,8 +10,6 @@ table that matches feats to ancestries, etc..
CREATE TABLE ancestries ( CREATE TABLE ancestries (
ancestry_id INTEGER PRIMARY KEY, ancestry_id INTEGER PRIMARY KEY,
sources_id INTEGER NOT NULL,
sources_pages TEXT,
short_name TEXT NOT NULL UNIQUE, short_name TEXT NOT NULL UNIQUE,
flavor_text TEXT NOT NULL, flavor_text TEXT NOT NULL,
hp INTEGER NOT NULL, hp INTEGER NOT NULL,
@ -85,3 +83,12 @@ CREATE TABLE ancestry_additionalangs (
FOREIGN KEY (ancestry_id) REFERENCES ancestries(ancestry_id), FOREIGN KEY (ancestry_id) REFERENCES ancestries(ancestry_id),
FOREIGN KEY (lang_id) REFERENCES langs(lang_id) FOREIGN KEY (lang_id) REFERENCES langs(lang_id)
); );
CREATE TABLE ancestries_sourceentries (
id INTEGER PRIMARY KEY
,ancestry_id INTEGER NOT NULL
,sourceentry_id INTEGER NOT NULL
,UNIQUE (id, actions_id, soruceentry_id),
,FOREIGN KEY (ancestry_id) REFERENCES ancestries(ancestry_id)
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
);