diff --git a/db/migrations/000069_profile_field_options.up.sql b/db/migrations/000069_profile_field_options.up.sql index 061fac1..d2db48f 100644 --- a/db/migrations/000069_profile_field_options.up.sql +++ b/db/migrations/000069_profile_field_options.up.sql @@ -71,4 +71,44 @@ INSERT INTO field_options (field_key, code, label, display_order, status) VALUES ('favourite_topic', 'CULTURE', 'Culture', 4, 'ACTIVE'), ('favourite_topic', 'TRAVEL', 'Travel', 5, 'ACTIVE'), ('favourite_topic', 'ENTERTAINMENT', 'Entertainment', 6, 'ACTIVE'), - ('favourite_topic', 'OTHER', 'Other', 99, 'ACTIVE'); + ('favourite_topic', 'OTHER', 'Other', 99, 'ACTIVE'), + + ('country', 'ET', 'Ethiopia', 1, 'ACTIVE'), + ('country', 'ER', 'Eritrea', 2, 'ACTIVE'), + ('country', 'DJ', 'Djibouti', 3, 'ACTIVE'), + ('country', 'SO', 'Somalia', 4, 'ACTIVE'), + ('country', 'KE', 'Kenya', 5, 'ACTIVE'), + ('country', 'SD', 'Sudan', 6, 'ACTIVE'), + ('country', 'SS', 'South Sudan', 7, 'ACTIVE'), + ('country', 'UG', 'Uganda', 8, 'ACTIVE'), + ('country', 'RW', 'Rwanda', 9, 'ACTIVE'), + ('country', 'TZ', 'Tanzania', 10, 'ACTIVE'), + ('country', 'EG', 'Egypt', 11, 'ACTIVE'), + ('country', 'NG', 'Nigeria', 12, 'ACTIVE'), + ('country', 'ZA', 'South Africa', 13, 'ACTIVE'), + ('country', 'US', 'United States', 20, 'ACTIVE'), + ('country', 'GB', 'United Kingdom', 21, 'ACTIVE'), + ('country', 'CA', 'Canada', 22, 'ACTIVE'), + ('country', 'DE', 'Germany', 23, 'ACTIVE'), + ('country', 'FR', 'France', 24, 'ACTIVE'), + ('country', 'IN', 'India', 25, 'ACTIVE'), + ('country', 'CN', 'China', 26, 'ACTIVE'), + ('country', 'SA', 'Saudi Arabia', 27, 'ACTIVE'), + ('country', 'AE', 'United Arab Emirates', 28, 'ACTIVE'), + ('country', 'OTHER', 'Other', 99, 'ACTIVE'), + + ('ethiopia_regions', 'ADDIS_ABABA', 'Addis Ababa', 1, 'ACTIVE'), + ('ethiopia_regions', 'DIRE_DAWA', 'Dire Dawa', 2, 'ACTIVE'), + ('ethiopia_regions', 'TIGRAY', 'Tigray', 3, 'ACTIVE'), + ('ethiopia_regions', 'AFAR', 'Afar', 4, 'ACTIVE'), + ('ethiopia_regions', 'AMHARA', 'Amhara', 5, 'ACTIVE'), + ('ethiopia_regions', 'OROMIA', 'Oromia', 6, 'ACTIVE'), + ('ethiopia_regions', 'SOMALI', 'Somali', 7, 'ACTIVE'), + ('ethiopia_regions', 'BENISHANGUL_GUMUZ', 'Benishangul-Gumuz', 8, 'ACTIVE'), + ('ethiopia_regions', 'GAMBELA', 'Gambela', 9, 'ACTIVE'), + ('ethiopia_regions', 'HARARI', 'Harari', 10, 'ACTIVE'), + ('ethiopia_regions', 'SIDAMA', 'Sidama', 11, 'ACTIVE'), + ('ethiopia_regions', 'SOUTH_ETHIOPIA', 'South Ethiopia', 12, 'ACTIVE'), + ('ethiopia_regions', 'SOUTH_WEST_ETHIOPIA', 'South West Ethiopia', 13, 'ACTIVE'), + ('ethiopia_regions', 'CENTRAL_ETHIOPIA', 'Central Ethiopia', 14, 'ACTIVE'), + ('ethiopia_regions', 'OTHER', 'Other', 99, 'ACTIVE'); diff --git a/db/migrations/000071_seed_country_field_options.down.sql b/db/migrations/000071_seed_country_field_options.down.sql new file mode 100644 index 0000000..2960e7a --- /dev/null +++ b/db/migrations/000071_seed_country_field_options.down.sql @@ -0,0 +1,7 @@ +DELETE FROM field_options +WHERE field_key = 'country' + AND code IN ( + 'ET', 'ER', 'DJ', 'SO', 'KE', 'SD', 'SS', 'UG', 'RW', 'TZ', + 'EG', 'NG', 'ZA', 'US', 'GB', 'CA', 'DE', 'FR', 'IN', 'CN', + 'SA', 'AE', 'OTHER' + ); diff --git a/db/migrations/000071_seed_country_field_options.up.sql b/db/migrations/000071_seed_country_field_options.up.sql new file mode 100644 index 0000000..5eeb2b4 --- /dev/null +++ b/db/migrations/000071_seed_country_field_options.up.sql @@ -0,0 +1,25 @@ +INSERT INTO field_options (field_key, code, label, display_order, status) VALUES + ('country', 'ET', 'Ethiopia', 1, 'ACTIVE'), + ('country', 'ER', 'Eritrea', 2, 'ACTIVE'), + ('country', 'DJ', 'Djibouti', 3, 'ACTIVE'), + ('country', 'SO', 'Somalia', 4, 'ACTIVE'), + ('country', 'KE', 'Kenya', 5, 'ACTIVE'), + ('country', 'SD', 'Sudan', 6, 'ACTIVE'), + ('country', 'SS', 'South Sudan', 7, 'ACTIVE'), + ('country', 'UG', 'Uganda', 8, 'ACTIVE'), + ('country', 'RW', 'Rwanda', 9, 'ACTIVE'), + ('country', 'TZ', 'Tanzania', 10, 'ACTIVE'), + ('country', 'EG', 'Egypt', 11, 'ACTIVE'), + ('country', 'NG', 'Nigeria', 12, 'ACTIVE'), + ('country', 'ZA', 'South Africa', 13, 'ACTIVE'), + ('country', 'US', 'United States', 20, 'ACTIVE'), + ('country', 'GB', 'United Kingdom', 21, 'ACTIVE'), + ('country', 'CA', 'Canada', 22, 'ACTIVE'), + ('country', 'DE', 'Germany', 23, 'ACTIVE'), + ('country', 'FR', 'France', 24, 'ACTIVE'), + ('country', 'IN', 'India', 25, 'ACTIVE'), + ('country', 'CN', 'China', 26, 'ACTIVE'), + ('country', 'SA', 'Saudi Arabia', 27, 'ACTIVE'), + ('country', 'AE', 'United Arab Emirates', 28, 'ACTIVE'), + ('country', 'OTHER', 'Other', 99, 'ACTIVE') +ON CONFLICT (field_key, code) DO NOTHING; diff --git a/db/migrations/000072_seed_ethiopia_regions_field_options.down.sql b/db/migrations/000072_seed_ethiopia_regions_field_options.down.sql new file mode 100644 index 0000000..7355558 --- /dev/null +++ b/db/migrations/000072_seed_ethiopia_regions_field_options.down.sql @@ -0,0 +1,7 @@ +DELETE FROM field_options +WHERE field_key = 'ethiopia_regions' + AND code IN ( + 'ADDIS_ABABA', 'DIRE_DAWA', 'TIGRAY', 'AFAR', 'AMHARA', 'OROMIA', 'SOMALI', + 'BENISHANGUL_GUMUZ', 'GAMBELA', 'HARARI', 'SIDAMA', 'SOUTH_ETHIOPIA', + 'SOUTH_WEST_ETHIOPIA', 'CENTRAL_ETHIOPIA', 'OTHER' + ); diff --git a/db/migrations/000072_seed_ethiopia_regions_field_options.up.sql b/db/migrations/000072_seed_ethiopia_regions_field_options.up.sql new file mode 100644 index 0000000..c753c4b --- /dev/null +++ b/db/migrations/000072_seed_ethiopia_regions_field_options.up.sql @@ -0,0 +1,17 @@ +INSERT INTO field_options (field_key, code, label, display_order, status) VALUES + ('ethiopia_regions', 'ADDIS_ABABA', 'Addis Ababa', 1, 'ACTIVE'), + ('ethiopia_regions', 'DIRE_DAWA', 'Dire Dawa', 2, 'ACTIVE'), + ('ethiopia_regions', 'TIGRAY', 'Tigray', 3, 'ACTIVE'), + ('ethiopia_regions', 'AFAR', 'Afar', 4, 'ACTIVE'), + ('ethiopia_regions', 'AMHARA', 'Amhara', 5, 'ACTIVE'), + ('ethiopia_regions', 'OROMIA', 'Oromia', 6, 'ACTIVE'), + ('ethiopia_regions', 'SOMALI', 'Somali', 7, 'ACTIVE'), + ('ethiopia_regions', 'BENISHANGUL_GUMUZ', 'Benishangul-Gumuz', 8, 'ACTIVE'), + ('ethiopia_regions', 'GAMBELA', 'Gambela', 9, 'ACTIVE'), + ('ethiopia_regions', 'HARARI', 'Harari', 10, 'ACTIVE'), + ('ethiopia_regions', 'SIDAMA', 'Sidama', 11, 'ACTIVE'), + ('ethiopia_regions', 'SOUTH_ETHIOPIA', 'South Ethiopia', 12, 'ACTIVE'), + ('ethiopia_regions', 'SOUTH_WEST_ETHIOPIA', 'South West Ethiopia', 13, 'ACTIVE'), + ('ethiopia_regions', 'CENTRAL_ETHIOPIA', 'Central Ethiopia', 14, 'ACTIVE'), + ('ethiopia_regions', 'OTHER', 'Other', 99, 'ACTIVE') +ON CONFLICT (field_key, code) DO NOTHING;