diff --git a/crates/sui-graphql-rpc/src/types/protocol_config.rs b/crates/sui-graphql-rpc/src/types/protocol_config.rs index 9a10021d529cf..ce60c22892d39 100644 --- a/crates/sui-graphql-rpc/src/types/protocol_config.rs +++ b/crates/sui-graphql-rpc/src/types/protocol_config.rs @@ -3,7 +3,7 @@ use async_graphql::*; use diesel::{ExpressionMethods, QueryDsl}; -use sui_indexer::schema::{checkpoints, epochs}; +use sui_indexer::schema::{chain_identifier, epochs}; use sui_protocol_config::{ProtocolConfig as NativeProtocolConfig, ProtocolVersion}; use crate::{ @@ -90,7 +90,7 @@ impl ProtocolConfigs { impl ProtocolConfigs { pub(crate) async fn query(db: &Db, protocol_version: Option) -> Result { - use checkpoints::dsl as c; + use chain_identifier::dsl as c; use epochs::dsl as e; let (latest_version, digest_bytes): (i64, Option>) = db @@ -99,9 +99,8 @@ impl ProtocolConfigs { e::epochs .select(( e::protocol_version, - c::checkpoints + c::chain_identifier .select(c::checkpoint_digest) - .filter(c::sequence_number.eq(0)) .single_value(), )) .order_by(e::epoch.desc()) diff --git a/crates/sui-indexer/src/schema/pg.rs b/crates/sui-indexer/src/schema/pg.rs index 322ad8b6a030a..564f7cd721343 100644 --- a/crates/sui-indexer/src/schema/pg.rs +++ b/crates/sui-indexer/src/schema/pg.rs @@ -296,14 +296,11 @@ macro_rules! for_all_tables { display, epochs, events, - events_partition_0, objects, objects_history, - objects_history_partition_0, objects_snapshot, packages, transactions, - transactions_partition_0, tx_calls, tx_changed_objects, tx_digests,