Skip to content

Commit

Permalink
added foreign key reference from AltItemNames to Item
Browse files Browse the repository at this point in the history
  • Loading branch information
bgol committed Oct 23, 2014
1 parent 6eebe49 commit e1f48ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion data/TradeDangerous.sql
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ CREATE TABLE AltItemNames
alt_name VARCHAR(40) NOT NULL COLLATE nocase,
item_id INTEGER NOT NULL,

PRIMARY KEY (alt_name, item_id)
PRIMARY KEY (alt_name, item_id),

FOREIGN KEY (item_id) REFERENCES Item(item_id)
ON UPDATE CASCADE
ON DELETE CASCADE
)
;

Expand Down

0 comments on commit e1f48ae

Please sign in to comment.