BitBagCommerce / SyliusVueStorefrontPlugin

Sylius plugin integrating Sylius with Vue Storefront
45 stars 24 forks source link

The table with name 'sylius_dev.sylius_order_item' already exists. #96

Closed mraivaras closed 4 years ago

mraivaras commented 4 years ago

Hello

When I try update database schema with bin/console doctrine:schema:update --force I'm getting this error

"The table with name 'sylius_dev.sylius_order_item' already exists."

Also tried this with existing table and without, same error. I think it's something related with src/Resources/config/doctrine/Order.OrderItem.orm.xml but not sure. This error reproduce on Sylius v1.7.4 but I think I tried on v1.6.0 and got same error. Without this some features breaks down. As I understand sylius_order_item table requires to have uuid because plugin overrides OrderItem Model with BitBag\SyliusVueStorefrontPlugin\Sylius\Entity\Order\OrderItem. It would be nice to know at least how to make work around.

Thanks

mraivaras commented 4 years ago

Found solution for this in Sylius v1.7.4. Sylius somewhy generates empty class by default on src/Entity/Order/OrderItem.php. So basically what needs to done is to change line 8 from use Sylius\Component\Core\Model\OrderItem as BaseOrderItem; to use BitBag\SyliusVueStorefrontPlugin\Sylius\Entity\Order\OrderItem as BaseOrderItem;

Codeweld commented 4 years ago

It's mentioned in the updated README file. Thank you for your input! I'm closing this one as it's resolved.