Bakery profit_margin is double in schema

This commit is contained in:
Sam Samai 2021-07-14 08:55:36 +10:00
parent b302a11586
commit 41bc47543a
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ impl EntityName for Entity {
pub struct Model { pub struct Model {
pub id: i32, pub id: i32,
pub name: String, pub name: String,
pub profit_margin: f32, pub profit_margin: f64,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)] #[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]

View File

@ -20,7 +20,7 @@ pub async fn create_bakery_table(db: &DbConn) -> Result<ExecResult, DbErr> {
.primary_key(), .primary_key(),
) )
.col(ColumnDef::new(bakery::Column::Name).string()) .col(ColumnDef::new(bakery::Column::Name).string())
.col(ColumnDef::new(bakery::Column::ProfitMargin).float()) .col(ColumnDef::new(bakery::Column::ProfitMargin).double())
.to_owned(); .to_owned();
create_table(db, &stmt).await create_table(db, &stmt).await