Skip to content

Commit 9f732be

Browse files
authored
Merge pull request #19 from IFRCGo/feature/WN-283
WN-283
2 parents 83d83f4 + 4588e60 commit 9f732be

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Support\Facades\DB;
5+
class InsertValuesIntoOrganisations extends Migration
6+
{
7+
/**
8+
* Run the migrations.
9+
*/
10+
public function up(): void
11+
{
12+
DB::table('organisations')->insert([
13+
['country_code' => 'GLB', 'org_name' => 'Global', 'oid_code' => 'urn:oid:2.49.0.4.1', 'attribution_url' => 'https://global.org/', 'attribution_file_name' => null],
14+
['country_code' => 'AMR', 'org_name' => 'Americas', 'oid_code' => 'urn:oid:2.49.0.4.2', 'attribution_url' => 'https://americas.org/', 'attribution_file_name' => null],
15+
['country_code' => 'APC', 'org_name' => 'Asia Pacific', 'oid_code' => 'urn:oid:2.49.0.4.3', 'attribution_url' => 'https://asiapacific.org/', 'attribution_file_name' => null],
16+
['country_code' => 'MNA', 'org_name' => 'MENA', 'oid_code' => 'urn:oid:2.49.0.4.4', 'attribution_url' => 'https://mena.org/', 'attribution_file_name' => null],
17+
['country_code' => 'EUR', 'org_name' => 'Europe', 'oid_code' => 'urn:oid:2.49.0.4.5', 'attribution_url' => 'https://europe.org/', 'attribution_file_name' => null],
18+
['country_code' => 'AFR', 'org_name' => 'Africa', 'oid_code' => 'urn:oid:2.49.0.4.6', 'attribution_url' => 'https://africa.org/', 'attribution_file_name' => null],
19+
]);
20+
}
21+
22+
/**
23+
* Reverse the migrations.
24+
*/
25+
public function down(): void
26+
{
27+
DB::table('organisations')
28+
->whereIn('country_code', ['GLB', 'AMR', 'APC', 'MNA', 'EUR', 'AFR'])
29+
->delete();
30+
}
31+
}

0 commit comments

Comments
 (0)