Add missing indices to schema
This commit is contained in:
@@ -32,8 +32,6 @@ CREATE TABLE item (
|
||||
);
|
||||
-- Add an index for "... WHERE deletion IS NULL"
|
||||
CREATE INDEX item_deletion_partial ON item (deleted) WHERE deleted IS NULL;
|
||||
-- * nuked: if the item has been removed from storage & user indicated he does not
|
||||
-- want to count it as potentially in his possession any longer
|
||||
|
||||
CREATE TABLE item_extra (
|
||||
item_id INTEGER PRIMARY KEY,
|
||||
@@ -65,6 +63,7 @@ CREATE TABLE item_extra (
|
||||
|
||||
FOREIGN KEY (item_id) REFERENCES item (id)
|
||||
);
|
||||
CREATE INDEX item_extra_item_id ON item_extra (item_id);
|
||||
|
||||
CREATE TABLE item_stat (
|
||||
id INTEGER PRIMARY KEY,
|
||||
@@ -77,6 +76,7 @@ CREATE TABLE item_stat (
|
||||
|
||||
FOREIGN KEY (item_id) REFERENCES item (id)
|
||||
);
|
||||
CREATE INDEX item_stat_item_id ON item_stat (item_id);
|
||||
CREATE INDEX item_stat_stat ON item_stat (stat);
|
||||
|
||||
CREATE TABLE item_affix (
|
||||
@@ -87,3 +87,4 @@ CREATE TABLE item_affix (
|
||||
|
||||
FOREIGN KEY (item_id) REFERENCES item (id)
|
||||
);
|
||||
CREATE INDEX item_affix_item_id ON item_affix (item_id);
|
||||
|
||||
Reference in New Issue
Block a user