refactor out senses and traits into separate schema files

This commit is contained in:
jrmiller82 committed 2019-08-06 15:25:14 -05:00
1 parent 801c4a9b11
commit 65f1425daf
4 files changed
+30 -22

No files matched your search

-22
View File
@@ -39,12 +39,6 @@ CREATE TABLE ancestries_flaws (
FOREIGN KEY (abilityscores_id) REFERENCES abilityscores(abilityscores_id)
);
/* has partial data */
CREATE TABLE visions (
vision_id INTEGER PRIMARY KEY,
short_name TEXT NOT NULL UNIQUE,
description TEXT NOT NULL
);
/* Need to figure out how to model heritages that also have reactions / feats
etc.. */
@@ -65,22 +59,6 @@ CREATE TABLE ancestries_heritages (
FOREIGN KEY (heritage_id) REFERENCES heritages(heritage_id)
);
/* TODO can the description var be UNIQUE? */
/* has partial data done */
CREATE TABLE traits (
trait_id INTEGER PRIMARY KEY,
-- short_name TEXT NOT NULL UNIQUE,
traittype INTEGER,
short_name TEXT NOT NULL,
description TEXT NOT NULL,
FOREIGN KEY (traittype) REFERENCES traittypes(traittypes_id)
);
CREATE TABLE traittypes (
traittype_id INTEGER PRIMARY KEY,
name TEXT NOT NULL
);
/* TODO THIS TABLE IS LIKELY NOT NEEDED. THANKS WES! */
CREATE TABLE heritages_traits (
+9
View File
@@ -0,0 +1,9 @@
-- -*- mode:sql sql-product:sqlite -*-
/* TODO change visions to a senses table */
CREATE TABLE visions (
vision_id INTEGER PRIMARY KEY,
short_name TEXT NOT NULL UNIQUE,
description TEXT NOT NULL
);
+17
View File
@@ -0,0 +1,17 @@
-- -*- mode:sql sql-product:sqlite -*-
CREATE TABLE traittypes (
traittype_id INTEGER PRIMARY KEY,
name TEXT NOT NULL
);
/* TODO can the description var be UNIQUE? */
/* has partial data done */
CREATE TABLE traits (
trait_id INTEGER PRIMARY KEY,
traittype INTEGER,
short_name TEXT NOT NULL,
description TEXT NOT NULL,
FOREIGN KEY (traittype) REFERENCES traittypes(traittypes_id)
);