mvdnbrk / warehouse-framework

Laravel Warehouse Framework
MIT License
69 stars 17 forks source link

Cannot insert duplicate key row in object 'reservation' When addInventory #50

Closed arisvn-quanVH closed 4 years ago

arisvn-quanVH commented 4 years ago

Describe the bug Cannot insert duplicate key row in object 'dbo.reservation' with unique index 'reservation_order_line_id_unique'

To Reproduce

$location = Location::find(1);
$location->addInventory('1300000000000');
$location->addInventory('1234567890005', 2);

Cannot insert duplicate key row in object 'reservation' with unique index 'reservation_order_line_id_unique'. The duplicate key value is (<NULL>). (SQL: insert into [reservation] ([inventory_id], [updated_at], [created_at]) values (2, 2020-02-06 12:44:52, 2020-02-06 12:44:52))

Please complete the following information:

mvdnbrk commented 4 years ago

I can not reproduce this.

Did you run the latest migrations that ships with v0.11.7?

mvdnbrk commented 4 years ago

Closing this for now.