mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-12 22:29:44 -04:00
fix some but not all bugs after turning on FK enforcement
This commit is contained in:
1 parent
ad3fbe3714
commit
6559b31024
6 files changed
+9
-9
No files matched your search
@@ -66,7 +66,7 @@ CREATE TABLE heritages_traits (
|
||||
id INTEGER PRIMARY KEY,
|
||||
heritage_id INTEGER NOT NULL,
|
||||
trait_id INTEGER NOT NULL,
|
||||
UNIQUE(heritage_id, trait_id),
|
||||
-- UNIQUE(heritage_id, trait_id),
|
||||
FOREIGN KEY (heritage_id) REFERENCES heritages(heritage_id),
|
||||
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
|
||||
);
|
||||
|
||||
+2
-2
@@ -38,9 +38,9 @@ CREATE TABLE armor (
|
||||
CREATE TABLE armor_traits (
|
||||
id INTEGER PRIMARY KEY,
|
||||
armor_id INTEGER NOT NULL,
|
||||
traits_id INTEGER NOT NULL,
|
||||
trait_id INTEGER NOT NULL,
|
||||
FOREIGN KEY (armor_id) REFERENCES armor(armor_id),
|
||||
FOREIGN KEY (traits_id) REFERENCES traits(traits_id)
|
||||
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
|
||||
);
|
||||
|
||||
|
||||
+3
-3
@@ -67,9 +67,9 @@ CREATE TABLE spells_spellcomponents(
|
||||
CREATE TABLE spells_traits (
|
||||
id INTEGER PRIMARY KEY,
|
||||
spells_id INTEGER NOT NULL,
|
||||
traits_id INTEGER NOT NULL,
|
||||
UNIQUE(spells_id, traits_id),
|
||||
trait_id INTEGER NOT NULL,
|
||||
UNIQUE(spells_id, trait_id),
|
||||
FOREIGN KEY (spells_id) REFERENCES spells(spells_id),
|
||||
FOREIGN KEY (traits_id) REFERENCES traits(traits_id)
|
||||
FOREIGN KEY (trait_id) REFERENCES traits(trait_id)
|
||||
);
|
||||
|
||||
+1
-1
@@ -12,6 +12,6 @@ CREATE TABLE traits (
|
||||
traittype INTEGER,
|
||||
short_name TEXT NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
FOREIGN KEY (traittype) REFERENCES traittypes(traittypes_id)
|
||||
FOREIGN KEY (traittype) REFERENCES traittypes(traittype_id)
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user