From 11e14b12ddf9a364d11e61450983277b75b69631 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 26 May 2023 15:23:26 -0700 Subject: [PATCH] don't drop columns for now --- migration/src/lib.rs | 1 - ...emove_columns_statsv2_origin_and_method.rs | 49 ------------------- 2 files changed, 50 deletions(-) delete mode 100644 migration/src/m20230511_161214_remove_columns_statsv2_origin_and_method.rs diff --git a/migration/src/lib.rs b/migration/src/lib.rs index 91c45391..8d577618 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -60,7 +60,6 @@ impl MigratorTrait for Migrator { Box::new(m20230307_002623_migrate_rpc_accounting_to_rpc_accounting_v2::Migration), Box::new(m20230412_171916_modify_secondary_user_add_primary_user::Migration), Box::new(m20230422_172555_premium_downgrade_logic::Migration), - Box::new(m20230511_161214_remove_columns_statsv2_origin_and_method::Migration), Box::new(m20230512_220213_allow_null_rpc_key_id_in_stats_v2::Migration), Box::new(m20230514_114803_admin_add_credits::Migration), ] diff --git a/migration/src/m20230511_161214_remove_columns_statsv2_origin_and_method.rs b/migration/src/m20230511_161214_remove_columns_statsv2_origin_and_method.rs deleted file mode 100644 index a5463c69..00000000 --- a/migration/src/m20230511_161214_remove_columns_statsv2_origin_and_method.rs +++ /dev/null @@ -1,49 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(RpcAccountingV2::Table) - .drop_column(RpcAccountingV2::Origin) - .drop_column(RpcAccountingV2::Method) - .to_owned(), - ) - .await - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(RpcAccountingV2::Table) - .add_column( - ColumnDef::new(RpcAccountingV2::Method) - .string() - .not_null() - .default(""), - ) - .add_column( - ColumnDef::new(RpcAccountingV2::Origin) - .string() - .not_null() - .default(""), - ) - .to_owned(), - ) - .await - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum RpcAccountingV2 { - Table, - Origin, - Method, -}