allow null calldata

This commit is contained in:
Bryan Stitt 2022-09-24 07:03:29 +00:00
parent bbaa32e7b5
commit a3bba43360
3 changed files with 4 additions and 3 deletions

1
Cargo.lock generated
View File

@ -5546,6 +5546,7 @@ dependencies = [
"moka",
"notify",
"num",
"num-traits",
"parking_lot 0.12.1",
"petgraph",
"proctitle",

View File

@ -13,8 +13,8 @@ pub struct Model {
pub timestamp: DateTimeUtc,
pub method: Method,
pub to: Vec<u8>,
#[sea_orm(column_type = "Text")]
pub call_data: String,
#[sea_orm(column_type = "Text", nullable)]
pub call_data: Option<String>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

View File

@ -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()