I want to change a columns comment in MySQL table with Laravel.
However, I get an error when migrating.
"Syntax error (SQL: ALTER TABLE category CHANGE zh-TW zh-TW VARCHAR(191) NOT NULL COMMENT 'Name in Chinese')".
Code as follow:
Schema::table('category', function (Blueprint $table) {
$table->string('zh-TW')->comment('Name in Chinese')->change();
});
Finally, I use code as below
`DB::statement("ALTER TABLE category CHANGE `zh-TW` `zh-TW` VARCHAR(191) NOT NULL comment 'Name in Chinese';");