Skip to content

Commit

Permalink
horizon: remove failed operations in migrate down script (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekn authored Feb 26, 2019
1 parent 575707e commit bd6f1b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions services/horizon/internal/db2/schema/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ALTER TABLE history_transactions ADD successful boolean;

-- +migrate Down

-- Remove failed transactions!
-- Remove failed transactions and operations from failed transactions!
DELETE FROM history_operations USING history_transactions
WHERE history_transactions.id = history_operations.transaction_id AND successful = false;
DELETE FROM history_transactions WHERE successful = false;
ALTER TABLE history_transactions DROP COLUMN successful;

0 comments on commit bd6f1b0

Please sign in to comment.