I want to create a field in my custom table "test_days" with values "days,week,month" and set default value as "days".
How is this possible with Magento 2?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
It's not supported in Magento 2. From the beginning of appearing ENUM data type in MySQL it was considered as a bad practice to use ENUM, because of many reasons. One of main problems with ENUM:
This short article describes most of drawbacks of ENUM type in MySQL http://komlenic.com/244/8-reasons-why-mysqls-enum-data-type-is-evil/
The preferable option is to use reference table into which an enumerated set of possible values of a certain field data type is divested. Like described here - http://komlenic.com/post_files/image/244/country_tables.png