From 5fd50040d3b6c1f726eba026938dca47d801ddec Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 16 Feb 2018 15:31:47 -0800 Subject: [PATCH] Fixed weird migration --- ..._02_19_070119_add_remember_token_to_users_table.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php b/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php index d5595ac1d5..6270018e53 100644 --- a/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php +++ b/database/migrations/2016_02_19_070119_add_remember_token_to_users_table.php @@ -12,9 +12,11 @@ class AddRememberTokenToUsersTable extends Migration */ public function up() { - Schema::table('users', function (Blueprint $table) { - $table->text('remember_token')->nullable()->default(NULL); - }); + if (!Schema::hasColumn('users', 'remember_token')) { + Schema::table('users', function (Blueprint $table) { + $table->text('remember_token')->nullable()->default(null); + }); + } } /** @@ -25,7 +27,7 @@ class AddRememberTokenToUsersTable extends Migration public function down() { Schema::table('users', function (Blueprint $table) { - // + $table->dropColumn('remember_token'); }); } }