mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-16 22:29:44 -04:00
Action categories completed start of actions
This commit is contained in:
1 parent
1b154d92f9
commit
97287d9231
2 files changed
+56
-18
No files matched your search
+12
-6
@@ -6,20 +6,16 @@ CREATE TABLE actioncosts (
|
||||
abbr TEXT NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
|
||||
-- TODO remove sources_id and sources_pages once sourceentries is finished --
|
||||
CREATE TABLE actioncategories (
|
||||
actioncategories_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER NOT NULL,
|
||||
sources_pages TEXT NOT NULL,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
descr TEXT NOT NULL UNIQUE,
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||
);
|
||||
|
||||
-- TODO remove sources_id and sources_pages once sourceentries is finished --
|
||||
CREATE TABLE actions (
|
||||
actions_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER NOT NULL,
|
||||
sources_pages TEXT NOT NULL,
|
||||
actioncategories_id INTEGER NOT NULL,
|
||||
actioncosts_id INTEGER,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
@@ -37,6 +33,16 @@ CREATE TABLE actions_traits (
|
||||
traits_id INTEGER NOT NULL
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE actioncategories_sourceentries (
|
||||
id INTEGER PRIMARY KEY
|
||||
,actioncategories_id INTEGER NOT NULL
|
||||
,sourceentry_id INTEGER NOT NULL
|
||||
,UNIQUE (id, actioncategories_id, soruceentry_id),
|
||||
,FOREIGN KEY (actioncategories_id) REFERENCES actioncategories(actioncategories_id)
|
||||
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE actions_sourceentries (
|
||||
id INTEGER PRIMARY KEY
|
||||
|
||||
Reference in new issue
Block a user