From 2d6c1dfb16916c892a6b5982d6aac8af3a9955a2 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 6 Aug 2022 04:39:33 +0000 Subject: [PATCH] auto increment --- migration/src/m20220101_000001_create_table.rs | 16 ++++++++-------- web3_proxy/src/jsonrpc.rs | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/migration/src/m20220101_000001_create_table.rs b/migration/src/m20220101_000001_create_table.rs index ea628d41..ff62f8c2 100644 --- a/migration/src/m20220101_000001_create_table.rs +++ b/migration/src/m20220101_000001_create_table.rs @@ -15,8 +15,8 @@ impl MigrationTrait for Migration { ColumnDef::new(User::Id) .big_integer() .not_null() - .primary_key() - .auto_increment(), + .auto_increment() + .primary_key(), ) .col( ColumnDef::new(User::Address) @@ -39,8 +39,8 @@ impl MigrationTrait for Migration { ColumnDef::new(SecondaryUser::Id) .big_integer() .not_null() - .primary_key() - .auto_increment(), + .auto_increment() + .primary_key(), ) .col( ColumnDef::new(SecondaryUser::UserId) @@ -78,8 +78,8 @@ impl MigrationTrait for Migration { ColumnDef::new(BlockList::Id) .big_integer() .not_null() - .primary_key() - .auto_increment(), + .auto_increment() + .primary_key(), ) .col( ColumnDef::new(BlockList::Address) @@ -101,8 +101,8 @@ impl MigrationTrait for Migration { ColumnDef::new(UserKeys::Id) .big_integer() .not_null() - .primary_key() - .auto_increment(), + .auto_increment() + .primary_key(), ) .col(ColumnDef::new(UserKeys::UserId).big_integer().not_null()) .col( diff --git a/web3_proxy/src/jsonrpc.rs b/web3_proxy/src/jsonrpc.rs index f5b1a7b8..904c147b 100644 --- a/web3_proxy/src/jsonrpc.rs +++ b/web3_proxy/src/jsonrpc.rs @@ -177,6 +177,7 @@ impl JsonRpcForwardedResponse { error: Some(JsonRpcErrorData { // TODO: set this jsonrpc error code to match the http status code code: -32099, + // TODO: some errors should be included here. others should not. i think anyhow might not be the right choice message: "internal server error".to_string(), data: None, }),