Выполняю laravel миграцию, выходит ошибка
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'after `id`) default character set utf8mb4 collate 'utf8mb4_unicode_ci'' at line 1 (SQL: create table `buyers` (`id` bigint unsigned not null auto_increment primary key, `created_at` timestamp null, `updated_at` timestamp null, `user_id` bigint unsigned null after `id`) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
Сама миграция
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBuyersTable extends Migration
{
public function up()
{
Schema::create('buyers', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table
->foreignId('user_id')
->nullable()
->after('id')
->constrained()
->onDelete('cascade');
});
}
public function down()
{
Schema::table('buyers', function (Blueprint $table) {
$table->dropForeign(['user_id']);
});
Schema::dropIfExists('buyers');
}
}
Подскажите, пожалуйста, что не так делаю.