$table->dropForeign('answers_user_id_foreign');
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->foreignId('author')->constrained('users')->onDelete('cascade')->onUpdate('cascade');
$table->timestamps();
});
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('author')->unsigned();
$table->timestamps();
$table->foreign('author')->references('id')->on('users')->onUpdate('cascade');
});