Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Jan 29, 2025
1 parent 4e0fd7b commit b8f0bdf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 52 deletions.
2 changes: 1 addition & 1 deletion das_api/src/api/api_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl DasApi {

page_opt.limit = limit.map(|x| x as u64).unwrap_or(1000);
if is_cursor_enabled {
if let Some(_) = &sorting {
if sorting.is_some() {
page_opt.cursor = Some(self.get_cursor(cursor)?);
}
} else {
Expand Down
6 changes: 2 additions & 4 deletions migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ mod m20240320_120101_add_mpl_core_info_items;
mod m20240520_120101_add_mpl_core_external_plugins_columns;
mod m20240718_161232_change_supply_columns_to_numeric;
mod m20241119_060310_add_token_inscription_enum_variant;
mod m20241209_100813_add_unique_index_for_asset_owner_and_supply;
mod m20241209_111604_add_index_for_asset_id_group_value_verified;
mod m20250129_111841_add_owner_idx_for_token_accounts;

pub mod model;

Expand Down Expand Up @@ -101,8 +100,7 @@ impl MigratorTrait for Migrator {
Box::new(m20240520_120101_add_mpl_core_external_plugins_columns::Migration),
Box::new(m20240718_161232_change_supply_columns_to_numeric::Migration),
Box::new(m20241119_060310_add_token_inscription_enum_variant::Migration),
Box::new(m20241209_100813_add_unique_index_for_asset_owner_and_supply::Migration),
Box::new(m20241209_111604_add_index_for_asset_id_group_value_verified::Migration),
Box::new(m20250129_111841_add_owner_idx_for_token_accounts::Migration),
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use crate::model::table::Asset;
use crate::model::table::TokenAccounts;

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand All @@ -11,12 +11,9 @@ impl MigrationTrait for Migration {
manager
.create_index(
Index::create()
.name("idx_asset_owner_supply")
.col(Asset::Owner)
.col(Asset::Supply)
.col(Asset::Burnt)
.col(Asset::OwnerType)
.table(Asset::Table)
.name("idx_token_account_owner")
.col(TokenAccounts::Owner)
.table(TokenAccounts::Table)
.to_owned(),
)
.await?;
Expand All @@ -28,8 +25,8 @@ impl MigrationTrait for Migration {
manager
.drop_index(
Index::drop()
.name("idx_asset_owner_supply")
.table(Asset::Table)
.name("idx_token_account_owner")
.table(TokenAccounts::Table)
.to_owned(),
)
.await?;
Expand Down

0 comments on commit b8f0bdf

Please sign in to comment.