Файл миграции
$table->increments('id');
$table->foreign('user_id')->references('id')->on('users');
$table->foreign('band_id')->references('id')->on('bands');
$table->foreign('genre_id')->references('id')->on('genres');
$table->foreign('cate_id')->references('id')->on('cates');
$table->foreign('type_id')->references('id')->on('types');
$table->integer('status');
$table->date('date');
$table->time('time');
$table->decimal('price');
$table->tinyIncrements('instrument');
$table->string('instrument_detail',255);
$table->timestamps();
После запуска php artisan migrate
SQLSTATE [42000]: синтаксическая ошибка или нарушение прав доступа: 1075 Неверное определение таблицы; может быть только один автоматический столбец, и он должен быть определен как ключ (SQL: create table
bookings
(id
int unsigned not null auto_increment primary key,status
int not null,date
date not null,time
time not null,price
decimal (8 , 2) не null,instrument
tinyint unsigned not null первичный ключ auto_increment,instrument_detail
varchar (255) not null,created_at
timestamp null,updated_at
timestamp null) набор символов по умолчанию utf8mb4 сопоставление utf8mb4_unicode_ci)
И это ниже
SQLSTATE [42000]: синтаксическая ошибка или нарушение прав доступа: 1075 Неверное определение таблицы; может быть только один автоматический столбец, и он должен быть определен как ключ