forked from MystenLabs/sui
-
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.
indexer-alt: remove {sum,wal}_{obj_types,coin_balances} (MystenLabs#2…
…0659) ## Description Clean up the previous consistent pipelines (obj_types and coin_balances) and their schemas. ## Test plan CI --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
Showing
11 changed files
with
136 additions
and
797 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
crates/sui-indexer-alt-schema/migrations/2024-12-17-162230_drop_sum_wal/down.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,50 @@ | ||
CREATE TABLE IF NOT EXISTS sum_obj_types | ||
( | ||
object_id BYTEA PRIMARY KEY, | ||
object_version BIGINT NOT NULL, | ||
owner_kind SMALLINT NOT NULL, | ||
owner_id BYTEA, | ||
package BYTEA, | ||
module TEXT, | ||
name TEXT, | ||
instantiation BYTEA | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_owner | ||
ON sum_obj_types (owner_kind, owner_id, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_pkg | ||
ON sum_obj_types (package, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_mod | ||
ON sum_obj_types (package, module, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_name | ||
ON sum_obj_types (package, module, name, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_inst | ||
ON sum_obj_types (package, module, name, instantiation, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_owner_pkg | ||
ON sum_obj_types (owner_kind, owner_id, package, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_owner_mod | ||
ON sum_obj_types (owner_kind, owner_id, package, module, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_owner_name | ||
ON sum_obj_types (owner_kind, owner_id, package, module, name, object_id, object_version); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_obj_types_owner_inst | ||
ON sum_obj_types (owner_kind, owner_id, package, module, name, instantiation, object_id, object_version); | ||
|
||
CREATE TABLE IF NOT EXISTS sum_coin_balances | ||
( | ||
object_id BYTEA PRIMARY KEY, | ||
object_version BIGINT NOT NULL, | ||
owner_id BYTEA NOT NULL, | ||
coin_type BYTEA NOT NULL, | ||
coin_balance BIGINT NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS sum_coin_balances_owner_type | ||
ON sum_coin_balances (owner_id, coin_type, coin_balance, object_id, object_version); |
7 changes: 7 additions & 0 deletions
7
crates/sui-indexer-alt-schema/migrations/2024-12-17-162230_drop_sum_wal/up.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,7 @@ | ||
DROP TABLE IF EXISTS sum_obj_types; | ||
|
||
DROP TABLE IF EXISTS wal_obj_types; | ||
|
||
DROP TABLE IF EXISTS sum_coin_balances; | ||
|
||
DROP TABLE IF EXISTS wal_coin_balances; |
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.