tweak monster types -> categories

merge-requests/35/merge
James R Miller 2019-08-18 19:41:50 -05:00
parent 56ae0099c4
commit abafdf9a35
1 changed files with 9 additions and 3 deletions

View File

@ -4,17 +4,22 @@ PRAGMA foreign_keys = ON;
-- TODO needs data
CREATE TABLE monstertypes(
monstertypes_id INTEGER PRIMARY KEY,
CREATE TABLE monstercategories(
monstercategories_id INTEGER PRIMARY KEY,
is_comty_use BOOLEAN NOT NULL, -- false = no community use policy req
"name" TEXT NOT NULL UNIQUE
);
-- Rarity will be by trait
-- Monster 'type' will be by trait
-- Monster 'category/family' will be by FK to table
CREATE TABLE monsters (
monsters_id INTEGER PRIMARY KEY,
is_comty_use BOOLEAN NOT NULL, -- false = no community use policy req
sources_id INTEGER,
sources_pages TEXT,
monstertypes_id INTEGER, -- Humanoid etc..
monstercategories_id INTEGER, -- Humanoid etc..
"name" TEXT NOT NULL UNIQUE,
"level" INTEGER,
alignment_id INTEGER, -- i.e. NG, LE etc..
@ -39,6 +44,7 @@ CREATE TABLE monsters (
-- this is more for getting markdown formatting of the stat block
-- in one nice column.
FOREIGN KEY (alignments_id) REFERENCES alignments(alignments_id),
FOREIGN KEY (monstercategories_id) REFERENCES monstercategories(monstercategories_id),
FOREIGN KEY (sizes_id) REFERENCES sizes(sizes_id),
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
);