Skip to content

Commit

Permalink
Merge pull request #147 from bcgov/SOW25N003-6
Browse files Browse the repository at this point in the history
Added new migration script to update Coastal Pacific Aviation Ltd. BC…
  • Loading branch information
m7amad-github authored Nov 20, 2024
2 parents 5b29dda + 44f6c13 commit 8c3ee03
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ private function loginUser(Request $request, $provider, $type): \Inertia\Respons
$failMsg = 'Welcome back! Please contact Institution Admin to grant you access.';

// Added later to capture business name
if (!is_null($user) && is_null($user->bceid_business_name)) {
/* if (!is_null($user) && is_null($user->bceid_business_name)) {
$user->update(['bceid_business_name' => $provider_user['bceid_business_name']]);
}
}*/
}

//if it is a new IDIR or BCeID user, register the user first
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
DB::table('institutions')
->where('bceid_business_guid', '474142177638458993db885d57333662')
->update(['bceid_business_guid' => '474142177638458993DB885D57333662']);

DB::table('users')
->where('bceid_business_guid', '474142177638458993DB885D57333662')
->delete();
}

/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};

0 comments on commit 8c3ee03

Please sign in to comment.