This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Migrations are generated with syntax error and wrong data type in MySQL #107
Description
When running $ yii gii/api
migrations files are generated with syntax error.
Consider a property/field
test_emails:
type: array
x-db-type: JSON
nullable: false
default: '[]'
create table are generated fine with no issues.
public function up()
{
$this->createTable('{{%table}}', [
'test_emails' => 'json NOT NULL DEFAULT \'[]\'',
but in case of alter
or later modification or adding a property to schema
$this->alterColumn('{{%table}}', 'test_emails', 'longtext NOT NULL DEFAULT '{}''); // quote should be escaped
Metadata
Metadata
Assignees
Labels
No labels