Last post May 06, 2020 12:00 PM by PatriceSc
May 06, 2020 09:46 AM|bluMarmalade|LINK
If i have a table with an enum column and then later i change the values in this enum, do i need to create a new migration and/or update database?
I have this enum for a property in my model:
public enum Response
then i migrade to the database and begin using it as such in my app.
but then later i decide i need more options in that enum so i just add another value. Do i need to update the database, or is this irrelevant since it is an integer anyway?
May 06, 2020 12:00 PM|PatriceSc|LINK
It should work. As you said it is just an integer column. Take care though to add new values at the end (or to give explicit values) to avoid changing mistakenly the underlying integer for a given option.