Remove unnecessary index

This commit is contained in:
Joscha 2023-08-06 02:00:33 +02:00
parent 00a0934658
commit 19a7bda8ab

View file

@ -5,8 +5,8 @@ CREATE TABLE commits (
) STRICT; ) STRICT;
CREATE TABLE commit_links ( CREATE TABLE commit_links (
parent TEXT NOT NULL,
child TEXT NOT NULL, child TEXT NOT NULL,
parent TEXT NOT NULL,
PRIMARY KEY (parent, child), PRIMARY KEY (parent, child),
FOREIGN KEY (parent) REFERENCES commits (hash) ON DELETE CASCADE, FOREIGN KEY (parent) REFERENCES commits (hash) ON DELETE CASCADE,
FOREIGN KEY (child) REFERENCES commits (hash) ON DELETE CASCADE FOREIGN KEY (child) REFERENCES commits (hash) ON DELETE CASCADE
@ -18,8 +18,5 @@ CREATE TABLE tracked_refs (
FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE
) STRICT; ) STRICT;
CREATE INDEX idx_commit_links_child_parent
ON commit_links(child, parent);
CREATE INDEX idx_commit_links_parent_child CREATE INDEX idx_commit_links_parent_child
ON commit_links(parent, child); ON commit_links(parent, child);