mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-12 22:29:44 -04:00
Removed insert for id, removed composite PK created id INTEGER PRIMARY KEY
This commit is contained in:
1 parent
4aaf11791f
commit
3ab787ec11
2 files changed
+55
-52
No files matched your search
+6
-3
@@ -28,28 +28,31 @@ CREATE TABLE staffactivations (
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE staff_staffactivations (
|
||||
id INTEGER PRIMARY KEY,
|
||||
staff_id INTEGER,
|
||||
staffactivations_id INTEGER,
|
||||
PRIMARY KEY (staff_id, staffactivations_id),
|
||||
FOREIGN KEY (staff_id) REFERENCES staff(staff_id),
|
||||
FOREIGN KEY (staffactivations_id) REFERENCES staffactivations(staffactivations_id)
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE staff_trait (
|
||||
id INTEGER PRIMARY KEY,
|
||||
staff_id INTEGER,
|
||||
trait_id INTEGER,
|
||||
PRIMARY KEY (staff_id, trait_id),
|
||||
FOREIGN KEY (staff_id) REFERENCES staff(staff_id),
|
||||
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE staff_spell (
|
||||
id INTEGER PRIMARY KEY,
|
||||
staff_id INTEGER,
|
||||
"level" INTEGER NOT NULL, -- This represents the level of the spell in the staff where 0 = cantrip --
|
||||
spell_id INTEGER,
|
||||
PRIMARY KEY (staff_id, "level", spell_id),
|
||||
FOREIGN KEY (staff_id) REFERENCES staff(staff_id),
|
||||
FOREIGN KEY (spell_id) REFERENCES spells(spells_id)
|
||||
);
|
||||
);
|
||||
|
||||
-- TODO CREATE TABLE staff_sourceentries -- joining table --
|
||||
Reference in new issue
Block a user