diff --git a/goose/migrations/1698861371_full_db_snapshot.sql b/goose/migrations/1698861371_full_db_snapshot.sql index 1deb2f005..6d4cf2da3 100644 --- a/goose/migrations/1698861371_full_db_snapshot.sql +++ b/goose/migrations/1698861371_full_db_snapshot.sql @@ -756,7 +756,7 @@ CREATE INDEX idx_created_at ON reference_objects USING btree (created_at DESC); -- Name: idx_lookup_hash; Type: INDEX; Schema: public; Owner: blobber_user -- -CREATE INDEX idx_lookup_hash ON reference_objects USING btree (lookup_hash) INCLUDE(id,reference_objects.type) where deleted_at IS NULL; +CREATE INDEX idx_lookup_hash ON reference_objects USING btree (lookup_hash) INCLUDE(id,type) where deleted_at IS NULL; -- diff --git a/goose/migrations/1718391849_ref_index.sql b/goose/migrations/1718391849_ref_index.sql index 93489da37..c6c3476db 100644 --- a/goose/migrations/1718391849_ref_index.sql +++ b/goose/migrations/1718391849_ref_index.sql @@ -2,7 +2,7 @@ -- +goose StatementBegin DROP INDEX idx_created_at,idx_updated_at,idx_path_gin_trgm,idx_name_gin,idx_allocation_changes_lookup_hash; -CREATE INDEX idx_is_precommit_deleted_at on reference_objects(allocation_id) INCLUDE(lookup_hash,id,reference_objects.type) WHERE is_precommit=true AND deleted_at IS NULL; +CREATE INDEX idx_is_precommit_deleted_at on reference_objects(allocation_id) INCLUDE(lookup_hash,id,type) WHERE is_precommit=true AND deleted_at IS NULL; CREATE INDEX idx_is_deleted on reference_objects(allocation_id) WHERE deleted_at IS NOT NULL; -- +goose StatementEnd \ No newline at end of file