How to set default table storage engine in MySQL using Entity Framework Core?

c# entity-framework-core entity-framework-core-migrations

Question

I'm using Pomelo.EntityFrameworkCore.MySql and would like to set InnoDB as the default storage engine for all my databases instead of the default MyISAM, but have no idea to do so in EFC code-first.

1
1
5/29/2019 6:19:04 AM

Accepted Answer

There is an opened issue in Pomelo.EntityFrameworkCore.MySql that an engine cannot be specified: link.

And on that page there is a workaround posted as: to use migrations instead of EnsureDatabaseCreated, and manually to set default_storage_engine variable to InnoDBduring migration db session: link to the workaround.

1
5/29/2019 10:04:31 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow