migrations icon indicating copy to clipboard operation
migrations copied to clipboard

Add support for enum

Open siamskoi opened this issue 3 years ago • 0 comments

Database: > Postgres 9.1 Code for migration:

->addColumn('status', 'enum', [
    'nullable' => false,
    'default'  => 'active',
    'values'   => [
        'active',
        'inactive',
        ...
    ]
])

Actual result: A table is created with a string type field and a constrain to check the values of this field.

Expected Result: Created enum type (what should be name of new type ?? ) and filed with new enum type.

siamskoi avatar Jan 04 '22 15:01 siamskoi