From 66471e29dfb826b2c46204e3a144ef941b31cd99 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 5 Apr 2023 14:48:48 -0700 Subject: [PATCH] cargo clippy --- ...ate_rpc_accounting_to_rpc_accounting_v2.rs | 44 +------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/migration/src/m20230307_002623_migrate_rpc_accounting_to_rpc_accounting_v2.rs b/migration/src/m20230307_002623_migrate_rpc_accounting_to_rpc_accounting_v2.rs index ab468e44..46a82c93 100644 --- a/migration/src/m20230307_002623_migrate_rpc_accounting_to_rpc_accounting_v2.rs +++ b/migration/src/m20230307_002623_migrate_rpc_accounting_to_rpc_accounting_v2.rs @@ -6,12 +6,11 @@ pub struct Migration; #[async_trait::async_trait] impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Add a nullable timestamp column to check if things were migrated in the rpc_accounting table .. + // Add a nullable timestamp column to check if things were migrated in the rpc_accounting table manager .alter_table( Table::alter() .table(RpcAccounting::Table) - .to_owned() .add_column(ColumnDef::new(RpcAccounting::Migrated).timestamp()) .to_owned(), ) @@ -30,48 +29,9 @@ impl MigrationTrait for Migration { } } -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -pub enum UserKeys { - Table, - Id, -} - +/// partial table for RpcAccounting #[derive(Iden)] enum RpcAccounting { Table, - Id, - UserKeyId, - ChainId, - Method, - ErrorResponse, - PeriodDatetime, - FrontendRequests, - BackendRequests, - BackendRetries, - NoServers, - CacheMisses, - CacheHits, - SumRequestBytes, - MinRequestBytes, - MeanRequestBytes, - P50RequestBytes, - P90RequestBytes, - P99RequestBytes, - MaxRequestBytes, - SumResponseMillis, - MinResponseMillis, - MeanResponseMillis, - P50ResponseMillis, - P90ResponseMillis, - P99ResponseMillis, - MaxResponseMillis, - SumResponseBytes, - MinResponseBytes, - MeanResponseBytes, - P50ResponseBytes, - P90ResponseBytes, - P99ResponseBytes, - MaxResponseBytes, Migrated, }