-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop index_history_operations_on_is_payment
- Loading branch information
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
services/horizon/internal/db2/schema/migrations/64_add_payment_flag_history_ops.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
-- +migrate Up | ||
|
||
ALTER TABLE history_operations ADD is_payment boolean; | ||
CREATE INDEX "index_history_operations_on_is_payment" ON history_operations (is_payment) | ||
WHERE is_payment = true; | ||
|
||
-- +migrate Down | ||
|
||
DROP INDEX "index_history_operations_on_is_payment"; | ||
ALTER TABLE history_operations DROP COLUMN is_payment; |
9 changes: 9 additions & 0 deletions
9
services/horizon/internal/db2/schema/migrations/65_drop_payment_index.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- +migrate Up | ||
|
||
-- index_history_operations_on_is_payment was added in migration 64 but it turns out | ||
-- the index was not necessary, see https://github.com/stellar/go/issues/5059 | ||
DROP INDEX IF EXISTS "index_history_operations_on_is_payment"; | ||
|
||
-- +migrate Down | ||
|
||
CREATE INDEX "index_history_operations_on_is_payment" ON history_operations USING btree (is_payment); |