yii2-openapi
yii2-openapi copied to clipboard
`default` in OpenAPI schema does not generate migration with `default()` in MariaDB
OpenAPI schema
properties:
id:
type: integer
list_owner:
$ref: '#/components/schemas/ListOwner'
price:
description: price in EUR
type: number
x-db-type: decimal(10,2)
default: 0
Generated Migration:
public function up()
{
$this->createTable('{{%table}}', [
'id' => $this->primaryKey(),
'list_owner_id' => $this->integer()->null()->defaultValue(null),
'price' => 'decimal(10,2) NOT NULL', // <-- default is not set here