mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-11-10 21:29:44 -05:00
Partially complete conversion to SourceEntries
This commit is contained in:
1 parent
c327528523
commit
9f94cbbe71
2 files changed
+312
-5
No files matched your search
+10
-3
@@ -7,15 +7,12 @@
|
||||
|
||||
CREATE TABLE feats (
|
||||
feat_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER NOT NULL,
|
||||
sources_pages TEXT NOT NULL,
|
||||
short_name TEXT NOT NULL UNIQUE,
|
||||
descr TEXT NOT NULL,
|
||||
action_id INTEGER,
|
||||
frequency_id INTEGER,
|
||||
triggers_id INTEGER,
|
||||
requirements_id INTEGER,
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id),
|
||||
FOREIGN KEY (action_id) REFERENCES actioncosts(actioncosts_id),
|
||||
FOREIGN KEY (frequency_id) REFERENCES frequency(freq_id),
|
||||
FOREIGN KEY (triggers_id) REFERENCES triggers(triggers_id),
|
||||
@@ -45,3 +42,13 @@ CREATE TABLE feats_traits (
|
||||
FOREIGN KEY (feat_id) REFERENCES feats(feat_id),
|
||||
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE feat_sourceentries (
|
||||
id INTEGER PRIMARY KEY
|
||||
,feat_id INTEGER NOT NULL
|
||||
,sourceentry_id INTEGER NOT NULL
|
||||
,UNIQUE (id, feat_id, sourceentry_id)
|
||||
,FOREIGN KEY (feat_id) REFERENCES feat(feat_id)
|
||||
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
|
||||
);
|
||||
Reference in new issue
Block a user