Skip to content

Commit

Permalink
Merge pull request #6 from dreamfactorysoftware/fix-migrations
Browse files Browse the repository at this point in the history
Remove service. from migrations
  • Loading branch information
yaroslavmo authored Sep 6, 2019
2 parents b6c7fb2 + 995a9b4 commit 11166d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)){
Expand Down Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

/**
Expand All @@ -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']);
}
}

0 comments on commit 11166d7

Please sign in to comment.