mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-16 22:29:44 -04:00
Backgrounds sourceentry conversion
This commit is contained in:
1 parent
964133aed0
commit
4e295080d8
2 files changed
+145
-53
No files matched your search
+10
-2
@@ -4,9 +4,17 @@ CREATE TABLE backgrounds (
|
||||
bg_id INTEGER PRIMARY KEY,
|
||||
"name" TEXT NOT NULL UNIQUE,
|
||||
descr TEXT NOT NULL,
|
||||
sources_id INTEGER NOT NULL,
|
||||
sources_pages TEXT NOT NULL,
|
||||
is_comty_use BOOLEAN NOT NULL, -- false = no community use policy required
|
||||
is_specific_to_adv BOOLEAN NOT NULL, -- means the background is specific to its adventure
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE backgrounds_sourceentries (
|
||||
id INTEGER PRIMARY KEY
|
||||
,bg_id INTEGER NOT NULL
|
||||
,sourceentry_id INTEGER NOT NULL
|
||||
,UNIQUE (id, bg_id, soruceentry_id),
|
||||
,FOREIGN KEY (bg_id) REFERENCES backgrounds(bg_id)
|
||||
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
|
||||
);
|
||||
Reference in new issue
Block a user