Open
Description
It will be cool if we can add a default function value for the column
new Column(
'id',
[
'type' => Column::TYPE_CHAR,
'default' => "uuid_generate_v4()",
'notNull' => true,
'size' => 36,
'first' => true
]
),
INSERT INTO dma.city ( country_id, name, lat, lng, population, status, title)
VALUES ( 'FR','france',1.0, 1.0, 100000000, 1 , 'France' );
Beautiful solution
- SQL :
ALTER TABLE dma.city ALTER COLUMN id SET DEFAULT uuid_generate_v4()
- PHP (expected) :
new Column(
'id',
[
'type' => Column::TYPE_CHAR,
'notNull' => true,
'size' => 36,
'first' => true,
'function'=> "uuid_generate_v4()"
]
),
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog