From 4588e605d15e19259b4b9a8a488353489cdbe9f9 Mon Sep 17 00:00:00 2001 From: "LDFOUR\\luisd" Date: Tue, 18 Mar 2025 13:36:46 -0300 Subject: [PATCH] WN-283 Created migration to add the following national societies: GLB, Global, urn:oid:2.49.0.4.1, https://global.org/ AMR, Americas, urn:oid:2.49.0.4.2, https://americas.org/ APC, Asia Pacific, urn:oid:2.49.0.4.3, https://asiapacific.org/ MNA, MENA, urn:oid:2.49.0.4.4, https://mena.org/ EUR, Europe, urn:oid:2.49.0.4.5, https://europe.org/ AFR, Africa, urn:oid:2.49.0.4.6, https://africa.org/ --- ...51133_insert_values_into_organisations.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2025_03_18_151133_insert_values_into_organisations.php diff --git a/database/migrations/2025_03_18_151133_insert_values_into_organisations.php b/database/migrations/2025_03_18_151133_insert_values_into_organisations.php new file mode 100644 index 0000000..8cde703 --- /dev/null +++ b/database/migrations/2025_03_18_151133_insert_values_into_organisations.php @@ -0,0 +1,31 @@ +insert([ + ['country_code' => 'GLB', 'org_name' => 'Global', 'oid_code' => 'urn:oid:2.49.0.4.1', 'attribution_url' => 'https://global.org/', 'attribution_file_name' => null], + ['country_code' => 'AMR', 'org_name' => 'Americas', 'oid_code' => 'urn:oid:2.49.0.4.2', 'attribution_url' => 'https://americas.org/', 'attribution_file_name' => null], + ['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], + ['country_code' => 'MNA', 'org_name' => 'MENA', 'oid_code' => 'urn:oid:2.49.0.4.4', 'attribution_url' => 'https://mena.org/', 'attribution_file_name' => null], + ['country_code' => 'EUR', 'org_name' => 'Europe', 'oid_code' => 'urn:oid:2.49.0.4.5', 'attribution_url' => 'https://europe.org/', 'attribution_file_name' => null], + ['country_code' => 'AFR', 'org_name' => 'Africa', 'oid_code' => 'urn:oid:2.49.0.4.6', 'attribution_url' => 'https://africa.org/', 'attribution_file_name' => null], + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + DB::table('organisations') + ->whereIn('country_code', ['GLB', 'AMR', 'APC', 'MNA', 'EUR', 'AFR']) + ->delete(); + } +}