Give default values to boolen field with migration

Hey all, I creaated table with migration. I have a boolean field. I want to display it as dropdown menu. In other words, I want to give default values so that user can select the one fits to her/him. How can I change it using migration. Should I change the field type or what? Thanks in advance.

1 Like

You need to define values for fields aka constants in appropriate class. For example, const Him = 0; const Her = 1; You can then make list out of this and fill into dropdown.

1 Like