Skip to content

Missing support for not nullable and default value using ENUM type for MySQL database #915

@batopa

Description

@batopa

#910 partially restored the ability to set column as enum for MySQL.

We have many enum columns defined as NOT NULLABLE and with a default value, for example

$this->table('objects')
    ->addColumn('status', 'enum', [
            'comment' => 'object status: on, draft, off, deleted',
            'default' => 'draft', // not working anymore
            'values' => ['on', 'off', 'draft'],
            'null' => false, // not working anymore
    ]);

adds an enum column NULLABLE with default NULL. Moreover (less important) the comment is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions