Skip to content

Commit 223948d

Browse files
authored
Merge branch 'fix/alloc-cache' into feat/ref-index
2 parents 76261a0 + 713bddd commit 223948d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-- +goose Up
22
-- +goose StatementBegin
3+
DELETE FROM terms WHERE allocation_id NOT IN (SELECT id FROM allocations);
34
ALTER TABLE ONLY terms DROP CONSTRAINT fk_terms_allocation;
45
ALTER TABLE ONLY terms ADD CONSTRAINT fk_terms_allocation foreign key (allocation_id) references allocations(id) ON DELETE CASCADE;
5-
CREATE INDEX idx_terms_allocation_id ON terms USING btree(allocation_id);
6+
CREATE INDEX idx_terms_allocation_id ON terms USING HASH(allocation_id);
67
-- +goose StatementEnd

0 commit comments

Comments
 (0)