cargo clippy

This commit is contained in:
Bryan Stitt 2023-04-05 14:48:48 -07:00
parent e90175c638
commit 66471e29df

View File

@ -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,
}