Skip to content

Commit

Permalink
[indexer] drop tx_recipients and tx_senders tables from schema (#20087)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## 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
wlmyng authored Oct 30, 2024
1 parent 419bac6 commit 831e97a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE TABLE tx_senders (
tx_sequence_number BIGINT NOT NULL,
sender BYTEA NOT NULL,
PRIMARY KEY(sender, tx_sequence_number)
);

CREATE INDEX IF NOT EXISTS tx_senders_tx_sequence_number
ON tx_senders (tx_sequence_number);

CREATE TABLE tx_recipients (
tx_sequence_number BIGINT NOT NULL,
recipient BYTEA NOT NULL,
sender BYTEA NOT NULL,
PRIMARY KEY(recipient, tx_sequence_number)
);

CREATE INDEX IF NOT EXISTS tx_recipients_sender
ON tx_recipients (sender, recipient, tx_sequence_number);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP TABLE IF EXISTS tx_senders;
DROP TABLE IF EXISTS tx_recipients;
17 changes: 0 additions & 17 deletions crates/sui-indexer/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,21 +354,6 @@ diesel::table! {
}
}

diesel::table! {
tx_recipients (recipient, tx_sequence_number) {
tx_sequence_number -> Int8,
recipient -> Bytea,
sender -> Bytea,
}
}

diesel::table! {
tx_senders (sender, tx_sequence_number) {
tx_sequence_number -> Int8,
sender -> Bytea,
}
}

diesel::table! {
watermarks (pipeline) {
pipeline -> Text,
Expand Down Expand Up @@ -415,7 +400,5 @@ diesel::allow_tables_to_appear_in_same_query!(
tx_digests,
tx_input_objects,
tx_kinds,
tx_recipients,
tx_senders,
watermarks,
);

0 comments on commit 831e97a

Please sign in to comment.