From a3ea8e3c62639a1f401a41b1493f6f68382966d9 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Fri, 26 Jun 2020 09:21:09 +0800 Subject: [PATCH] fix test --- .../2019_03_16_162603_remove_likes_field.php | 4 ---- ...020_06_26_090510_add_o_auth_provider_field.php | 15 +++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/database/migrations/2019_03_16_162603_remove_likes_field.php b/database/migrations/2019_03_16_162603_remove_likes_field.php index 64c12d89..94b96274 100644 --- a/database/migrations/2019_03_16_162603_remove_likes_field.php +++ b/database/migrations/2019_03_16_162603_remove_likes_field.php @@ -14,8 +14,4 @@ class RemoveLikesField extends Migration }); } } - - public function down() - { - } } diff --git a/database/migrations/2020_06_26_090510_add_o_auth_provider_field.php b/database/migrations/2020_06_26_090510_add_o_auth_provider_field.php index c41e7208..5ea7eddd 100644 --- a/database/migrations/2020_06_26_090510_add_o_auth_provider_field.php +++ b/database/migrations/2020_06_26_090510_add_o_auth_provider_field.php @@ -8,15 +8,10 @@ class AddOAuthProviderField extends Migration { public function up() { - Schema::table('oauth_clients', function (Blueprint $table) { - $table->string('provider')->after('secret')->nullable(); - }); - } - - public function down() - { - Schema::table('oauth_clients', function (Blueprint $table) { - $table->removeColumn('provider'); - }); + if (!Schema::hasColumn('oauth_clients', 'provider')) { + Schema::table('oauth_clients', function (Blueprint $table) { + $table->string('provider')->after('secret')->nullable(); + }); + } } }