diff --git a/schema/actions.sql b/schema/actions.sql index d8aa616..53f1d87 100644 --- a/schema/actions.sql +++ b/schema/actions.sql @@ -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) +); \ No newline at end of file