I cannot execute migrate:fresh.
Command fails at changing table column from:
$table->string('language_id')->default('')->length(255);
to:
$table->integer('language_id')->unsigned()->default(1)->change();
Error that I'm getting:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHARACTER SET utf8mb4 DEFAULT 1 NOT N ULL COLLATE
utf8mb4_unicode_ci' at line 1 (SQL: ALTER TABLE users CHANGE language_id language_id INT UNSIGNED CHA RACTER SET utf8mb4 DEFAULT 1 NOT NULL COLLATEutf8mb4_unicode_ci)
Any help/hints would be appreciated.
integerthen set default value or vice versa - ege$table->integer('language_id')->default(1)->unsigned()->change();- crescaststringtointeger. Maybe you need to remove some attributes of that field before changing it. LikeCHARACTER SET utf8mb4as it says in your error - egeDB::raw($query)to add it to a migration file. It's laborious, but it might reveal what the issue is. - ege