forked from near/near-indexer-for-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
238 additions
and
245 deletions.
There are no files selected for viewing
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
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,12 @@ | ||
-- We do not drop `DELEGATE_ACTION` here because we can't remove items from enum in Postgres. | ||
-- To be honest, it does not sound as a big problem. `IF_NOT_EXISTS` will prevent re-adding it. | ||
|
||
ALTER TABLE transaction_actions | ||
DROP COLUMN is_delegate_action, | ||
DROP COLUMN delegate_parameters, | ||
DROP COLUMN delegate_parent_index_in_transaction; | ||
|
||
ALTER TABLE action_receipt_actions | ||
DROP COLUMN is_delegate_action, | ||
DROP COLUMN delegate_parameters, | ||
DROP COLUMN delegate_parent_index_in_action_receipt; |
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,17 @@ | ||
-- If your DB is not empty, you need to turn off the Indexer, then apply the migration, then switch to 0.12.0 | ||
|
||
ALTER TYPE action_kind ADD VALUE IF NOT EXISTS 'DELEGATE_ACTION'; | ||
|
||
-- For all happy users of Postgres 11+, this should run fast | ||
ALTER TABLE transaction_actions | ||
ADD COLUMN is_delegate_action BOOLEAN NOT NULL DEFAULT FALSE, | ||
ADD COLUMN delegate_parameters JSONB, | ||
ADD COLUMN delegate_parent_index_in_transaction INTEGER; | ||
|
||
ALTER TABLE action_receipt_actions | ||
ADD COLUMN is_delegate_action BOOLEAN NOT NULL DEFAULT FALSE, | ||
ADD COLUMN delegate_parameters JSONB, | ||
ADD COLUMN delegate_parent_index_in_action_receipt INTEGER; | ||
|
||
ALTER TABLE transaction_actions ALTER COLUMN is_delegate_action DROP DEFAULT; | ||
ALTER TABLE action_receipt_actions ALTER COLUMN is_delegate_action DROP DEFAULT; |
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
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
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
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
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
Oops, something went wrong.