Skip to content

After updating to 4.7.0, it is not possible to define default using Literal for a column. #893

@Mapiiik

Description

@Mapiiik

After updating to 4.7.0, it is not possible to define default using Literal for a column.

Therefore, for example, this definition does not work:

use Migrations\Db\Literal;
...
        $this->table('access_point_contacts', ['id' => false, 'primary_key' => ['id']])
            ->addColumn('id', 'uuid', [
                'default' => Literal::from('uuid_generate_v4()'),
                'limit' => null,
                'null' => false,
            ])
...

This incorrectly generates the SQL as follows (with single quotes):
"id" UUID NOT NULL DEFAULT 'uuid_generate_v4()'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions