Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
BlinkyStitt committed Apr 5, 2023
1 parent e90175c commit 66471e2
Showing 1 changed file with 2 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
Expand All @@ -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,
}

0 comments on commit 66471e2

Please sign in to comment.