SpatialFocus / EntityFrameworkCore.Extensions

A set of useful extensions for EntityFrameworkCore (Enum Lookup Tables, Naming of tables / properties / keys, Pluralize).
MIT License
23 stars 11 forks source link

Enum Lookup Tables don't migrate updates to Enums #11

Open WilliamABradley opened 5 years ago

WilliamABradley commented 5 years ago

I am liking this EF Core extension, however, If you created an Enum in a previous migration, then update the Enum values, the new values are not migrated to the Lookup Table.

This could potentially be fixed by doing a comparison of existing Lookup Tables against the current state of the Enum to see if it is different.

WilliamABradley commented 5 years ago

ping @pergerch

pergerch commented 5 years ago

@WilliamABradley thank you for pointing that out. I remember having issues with migrations in the past. I think the problem was when changing the existing enums values only. It was necessary to manually modify the migrations. New ones were working properly.

Feel free to send a PR with improvements as I don't have much time to work on this at the moment. But I'll keep it on the radar