From c0177bffc58ce61fcf0c6cbe23e439a1423f07a7 Mon Sep 17 00:00:00 2001 From: Sam Samai Date: Sun, 4 Jul 2021 11:19:16 +1000 Subject: [PATCH] Fix create order table foreign keys --- tests/schema/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/schema/mod.rs b/tests/schema/mod.rs index b0536873..250fc7e3 100644 --- a/tests/schema/mod.rs +++ b/tests/schema/mod.rs @@ -96,7 +96,7 @@ pub async fn create_order_table(db: &DbConn) -> Result { .foreign_key( ForeignKey::create() .name("FK_order_bakery") - .from(order::Entity, baker::Column::BakeryId) + .from(order::Entity, order::Column::BakeryId) .to(bakery::Entity, bakery::Column::Id) .on_delete(ForeignKeyAction::Cascade) .on_update(ForeignKeyAction::Cascade), @@ -104,7 +104,7 @@ pub async fn create_order_table(db: &DbConn) -> Result { .foreign_key( ForeignKey::create() .name("FK_order_customer") - .from(order::Entity, baker::Column::BakeryId) + .from(order::Entity, order::Column::CustomerId) .to(customer::Entity, customer::Column::Id) .on_delete(ForeignKeyAction::Cascade) .on_update(ForeignKeyAction::Cascade),