From 63021ea93c9d3e1a4d07201a5c8c3bd7241a0b27 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Sun, 28 Apr 2019 23:37:58 -0400 Subject: [PATCH] Set contact and subscription table fields nullable and use bigIncrements for the contact, subscription and blog table ids --- .../migrations/2015_12_14_200624_add_contact_table.php | 8 ++++---- .../2015_12_17_232249_add_subscription_table.php | 6 +++--- database/migrations/2018_04_17_222542_add_blog_table.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/database/migrations/2015_12_14_200624_add_contact_table.php b/database/migrations/2015_12_14_200624_add_contact_table.php index aaf6438..0ba2fe9 100644 --- a/database/migrations/2015_12_14_200624_add_contact_table.php +++ b/database/migrations/2015_12_14_200624_add_contact_table.php @@ -14,10 +14,10 @@ class AddContactTable extends Migration public function up() { Schema::create('contact', function(Blueprint $table) { - $table->increments('id'); - $table->string('name'); - $table->string('email'); - $table->text('message'); + $table->bigIncrements('id'); + $table->string('name')->nullable(); + $table->string('email')->nullable(); + $table->text('message')->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2015_12_17_232249_add_subscription_table.php b/database/migrations/2015_12_17_232249_add_subscription_table.php index 7e901d0..381da9b 100644 --- a/database/migrations/2015_12_17_232249_add_subscription_table.php +++ b/database/migrations/2015_12_17_232249_add_subscription_table.php @@ -14,9 +14,9 @@ class AddSubscriptionTable extends Migration public function up() { Schema::create('subscriptions', function(Blueprint $table) { - $table->increments('id'); - $table->string('name'); - $table->string('email'); + $table->bigIncrements('id'); + $table->string('name')->nullable(); + $table->string('email')->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2018_04_17_222542_add_blog_table.php b/database/migrations/2018_04_17_222542_add_blog_table.php index 67dab4c..8473522 100644 --- a/database/migrations/2018_04_17_222542_add_blog_table.php +++ b/database/migrations/2018_04_17_222542_add_blog_table.php @@ -14,7 +14,7 @@ class AddBlogTable extends Migration public function up() { Schema::create('blog', function(Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->bigInteger('user_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->string('title')->nullable();