diff --git a/data/TradeDangerous.sql b/data/TradeDangerous.sql index bcdb14ac..9a196fce 100644 --- a/data/TradeDangerous.sql +++ b/data/TradeDangerous.sql @@ -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 ) ;