diff --git a/Cargo.lock b/Cargo.lock index 2836b89e..8384a809 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5546,6 +5546,7 @@ dependencies = [ "moka", "notify", "num", + "num-traits", "parking_lot 0.12.1", "petgraph", "proctitle", diff --git a/entities/src/revert_logs.rs b/entities/src/revert_logs.rs index 9d466590..f20bcfe5 100644 --- a/entities/src/revert_logs.rs +++ b/entities/src/revert_logs.rs @@ -13,8 +13,8 @@ pub struct Model { pub timestamp: DateTimeUtc, pub method: Method, pub to: Vec, - #[sea_orm(column_type = "Text")] - pub call_data: String, + #[sea_orm(column_type = "Text", nullable)] + pub call_data: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/migration/src/m20220921_181610_log_reverts.rs b/migration/src/m20220921_181610_log_reverts.rs index 3cb73b84..12b5e89e 100644 --- a/migration/src/m20220921_181610_log_reverts.rs +++ b/migration/src/m20220921_181610_log_reverts.rs @@ -61,7 +61,7 @@ impl MigrationTrait for Migration { .not_null(), ) .col(ColumnDef::new(RevertLogs::To).binary_len(20).not_null()) - .col(ColumnDef::new(RevertLogs::CallData).text().not_null()) + .col(ColumnDef::new(RevertLogs::CallData).text().null()) .index(sea_query::Index::create().col(RevertLogs::To)) .foreign_key( sea_query::ForeignKey::create()