Update the blog foreign key so it uses a bigInteger to match the use of bigIncrements for users

This commit is contained in:
Kevin MacMartin 2019-04-17 17:29:40 -04:00
parent ed380f804f
commit 2a88427c2f

View file

@ -15,7 +15,7 @@ class AddBlogTable extends Migration
{
Schema::create('blog', function(Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->bigInteger('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('title')->nullable();
$table->text('body')->nullable();