From 995a9b444c1992410c91b776b286a39768cde484 Mon Sep 17 00:00:00 2001 From: Yaroslav Mokhurenko Date: Fri, 6 Sep 2019 12:44:00 +0300 Subject: [PATCH] Remove service. from migrations --- .../2019_01_17_174733_create_bitbucket2_config_table.php | 8 ++++---- ...0_rename_service_type_from_bitbucket2_to_bitbucket.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/database/migrations/2019_01_17_174733_create_bitbucket2_config_table.php b/database/migrations/2019_01_17_174733_create_bitbucket2_config_table.php index 96bdd75..17186d3 100644 --- a/database/migrations/2019_01_17_174733_create_bitbucket2_config_table.php +++ b/database/migrations/2019_01_17_174733_create_bitbucket2_config_table.php @@ -24,8 +24,8 @@ function (Blueprint $t) { $t->text('token')->nullable(); } ); - DB::table('service')->where('service.type', '=', 'bitbucket') - ->update(['service.type' => 'bitbucket2']); + DB::table('service')->where('type', '=', 'bitbucket') + ->update(['type' => 'bitbucket2']); $bitbucket_config_data = DB::table("bitbucket_config")->get(); foreach($bitbucket_config_data as $bitbucket_record){ if(!(DB::table('bitbucket2_config')->where('service_id', '=', $bitbucket_record->service_id)->get()->count() > 0)){ @@ -60,8 +60,8 @@ public function down() ]); } } - DB::table('service')->where('service.type', '=', 'bitbucket2') - ->update(['service.type' => 'bitbucket']); + DB::table('service')->where('type', '=', 'bitbucket2') + ->update(['type' => 'bitbucket']); DB::table("bitbucket2_config")->delete(); Schema::dropIfExists('bitbucket2_config'); } diff --git a/database/migrations/2019_07_26_110740_rename_service_type_from_bitbucket2_to_bitbucket.php b/database/migrations/2019_07_26_110740_rename_service_type_from_bitbucket2_to_bitbucket.php index be48965..4592071 100644 --- a/database/migrations/2019_07_26_110740_rename_service_type_from_bitbucket2_to_bitbucket.php +++ b/database/migrations/2019_07_26_110740_rename_service_type_from_bitbucket2_to_bitbucket.php @@ -14,8 +14,8 @@ class RenameServiceTypeFromBitbucket2ToBitbucket extends Migration */ public function up() { - DB::table('service')->where('service.type', '=', 'bitbucket2') - ->update(['service.type' => 'bitbucket']); + DB::table('service')->where('type', '=', 'bitbucket2') + ->update(['type' => 'bitbucket']); } /** @@ -25,7 +25,7 @@ public function up() */ public function down() { - DB::table('service')->where('service.type', '=', 'bitbucket') - ->update(['service.type' => 'bitbucket2']); + DB::table('service')->where('type', '=', 'bitbucket') + ->update(['type' => 'bitbucket2']); } }