Skip to content

Commit

Permalink
remove asset table compact index for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Feb 13, 2025
1 parent fbc66cc commit 358a58e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
2 changes: 0 additions & 2 deletions migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ 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 m20250213_053425_add_idx_asset_owner_type_supply_burnt;
mod m20250213_053451_add_idx_token_accounts_owner;

pub mod model;
Expand Down Expand Up @@ -101,7 +100,6 @@ 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(m20250213_053425_add_idx_asset_owner_type_supply_burnt::Migration),
Box::new(m20250213_053451_add_idx_token_accounts_owner::Migration),
]
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::model::table::Asset;
use super::model::table::TokenAccounts;
use sea_orm::{ConnectionTrait, DatabaseBackend, Statement};
use sea_orm_migration::prelude::*;

Expand All @@ -12,7 +12,7 @@ impl MigrationTrait for Migration {

conn.execute(Statement::from_string(
DatabaseBackend::Postgres,
"CREATE INDEX CONCURRENTLY IF NOT EXISTS asset_owner_type_supply_burnt_idx ON asset (owner_type, supply, burnt);"
"CREATE INDEX CONCURRENTLY IF NOT EXISTS token_accounts_owner_idx ON token_accounts (owner);"
.to_string(),
))
.await?;
Expand All @@ -24,8 +24,8 @@ impl MigrationTrait for Migration {
manager
.drop_index(
Index::drop()
.name("asset_owner_type_supply_burnt_idx")
.table(Asset::Table)
.name("token_accounts_owner_idx")
.table(TokenAccounts::Table)
.to_owned(),
)
.await?;
Expand Down

0 comments on commit 358a58e

Please sign in to comment.