diff --git a/schema.sql b/schema.sql index ebc2942..7e0bc30 100644 --- a/schema.sql +++ b/schema.sql @@ -134,5 +134,6 @@ CREATE TABLE IF NOT EXISTS inventory ( location INTEGER, quantity INTEGER NOT NULL, FOREIGN KEY (part) REFERENCES part (id), - FOREIGN KEY (location) REFERENCES location (id) + FOREIGN KEY (location) REFERENCES location (id), + UNIQUE (part, location) );