From a55645d4f7ef446372e11460cbe01d3d3d9ab24d Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 13 May 2018 21:16:52 -0700 Subject: [PATCH] Update 2017_09_05_214452_add_time_attribute_to_users.php --- .../2017_09_05_214452_add_time_attribute_to_users.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/migrations/2017_09_05_214452_add_time_attribute_to_users.php b/migrations/2017_09_05_214452_add_time_attribute_to_users.php index a7be001..d954acc 100644 --- a/migrations/2017_09_05_214452_add_time_attribute_to_users.php +++ b/migrations/2017_09_05_214452_add_time_attribute_to_users.php @@ -14,9 +14,11 @@ return [ 'up' => function (Builder $schema) { - $schema->table('users', function (Blueprint $table) { - $table->dateTime('last_vote_time'); - }); + if (!$schema->hasColumn('users', 'last_vote_time')) { + $schema->table('users', function (Blueprint $table) { + $table->dateTime('last_vote_time'); + }); + } }, 'down' => function (Builder $schema) { $schema->table('users', function (Blueprint $table) {