null and unique don't play nice

This commit is contained in:
Bryan Stitt 2023-04-05 14:36:51 -07:00
parent 2e934a41bf
commit 18f0402fb1

@ -20,20 +20,31 @@ impl MigrationTrait for Migration {
.col( .col(
ColumnDef::new(RpcAccountingV2::RpcKeyId) ColumnDef::new(RpcAccountingV2::RpcKeyId)
.big_unsigned() .big_unsigned()
.null(), .not_null()
.default(0),
) )
.col( .col(
ColumnDef::new(RpcAccountingV2::ChainId) ColumnDef::new(RpcAccountingV2::ChainId)
.big_unsigned() .big_unsigned()
.not_null(), .not_null(),
) )
.col(ColumnDef::new(RpcAccountingV2::Origin).string().null()) .col(
ColumnDef::new(RpcAccountingV2::Origin)
.string()
.not_null()
.default(""),
)
.col( .col(
ColumnDef::new(RpcAccountingV2::PeriodDatetime) ColumnDef::new(RpcAccountingV2::PeriodDatetime)
.timestamp() .timestamp()
.not_null(), .not_null(),
) )
.col(ColumnDef::new(RpcAccountingV2::Method).string().null()) .col(
ColumnDef::new(RpcAccountingV2::Method)
.string()
.not_null()
.default(""),
)
.col( .col(
ColumnDef::new(RpcAccountingV2::ArchiveNeeded) ColumnDef::new(RpcAccountingV2::ArchiveNeeded)
.boolean() .boolean()