Many-to-many table for actions and sourceentry
parent
2e5b1dfcaf
commit
72f5d358f5
|
@ -36,3 +36,13 @@ CREATE TABLE actions_traits (
|
|||
actions_id INTEGER NOT NULL,
|
||||
traits_id INTEGER NOT NULL
|
||||
);
|
||||
|
||||
-- Joining table --
|
||||
CREATE TABLE actions_sourceentries (
|
||||
id INTEGER PRIMARY KEY
|
||||
,actions_id INTEGER NOT NULL
|
||||
,sourceentry_id INTEGER NOT NULL
|
||||
,UNIQUE (id, actions_id, soruceentry_id),
|
||||
,FOREIGN KEY (actions_id) REFERENCES actions(actions_id)
|
||||
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentry(sourceentry_id)
|
||||
);
|
Loading…
Reference in New Issue