-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Abah Roland <59082428+vickyrolanda@users.noreply.github.com> Co-authored-by: Firliani Fauziah <firlianif@gmail.com> Co-authored-by: Agung Sugiarto <sugiartoagung92@gmail.com> Co-authored-by: Afila <apidongblog@gmail.com> Co-authored-by: sarwono <scqolbu@gmail.com> Co-authored-by: scqolbu24 <scqolbu24@users.noreply.github.com> Co-authored-by: agungsugiarto <agungsugiarto@users.noreply.github.com>
- Loading branch information
1 parent
152a75d
commit ea4c710
Showing
3 changed files
with
74 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
*/ | ||
function pantau_versi() | ||
{ | ||
return 'v2411.0.0'; | ||
return 'v2412.0.0'; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
database/migrations/2024_11_12_133856_update_regions_for_papua_barat_daya.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\DB; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
DB::table('tbl_regions')->insertOrIgnore([ | ||
'region_code' => '96', | ||
'region_name' => 'PAPUA BARAT DAYA', | ||
'new_region_name' => null, | ||
'keterangan' => 'Provinsi baru', | ||
'parent_code' => null, | ||
'created_at' => now(), | ||
'updated_at' => now(), | ||
]); | ||
|
||
$provinsi = [ | ||
'92.01', // Kabupaten Sorong | ||
'92.04', // Kabupaten Sorong Selatan | ||
'92.05', // Kabupaten Raja Ampat | ||
'92.09', // Kabupaten Tambrauw | ||
'92.10', // Kabupaten Maybrat | ||
'92.71' // Kota Sorong | ||
]; | ||
|
||
foreach ($provinsi as $prov) { | ||
DB::table('tbl_regions') | ||
->where('region_code', $prov) | ||
->update([ | ||
'parent_code' => '96', | ||
'updated_at' => now() | ||
]); | ||
} | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
DB::table('tbl_regions') | ||
->where('region_code', '96') | ||
->delete(); | ||
|
||
$provinsi = [ | ||
'92.01', // Kabupaten Sorong | ||
'92.04', // Kabupaten Sorong Selatan | ||
'92.05', // Kabupaten Raja Ampat | ||
'92.09', // Kabupaten Tambrauw | ||
'92.10', // Kabupaten Maybrat | ||
'92.71' // Kota Sorong | ||
]; | ||
|
||
foreach ($provinsi as $prov) { | ||
DB::table('tbl_regions') | ||
->where('region_code', $prov) | ||
->update([ | ||
'parent_code' => '92' | ||
]); | ||
} | ||
} | ||
}; |