General error: 1005 Can't create table
eapi .
#sql-12e8_2 (errno:
150 "Foreign key constraint is incorrectly formed") (SQL: alter table
产品add constraint
products_user_id_foreign foreign key (
user_id ) references
用户(
id`)在删除级联上)
Schema::create('products', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->integer('price');
$table->text('details');
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('user')->onDelete('cascade');
$table->timestamps();
});