From 2d81dd91e7599eb3f86351368fe731f861f82fa3 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 22 Jan 2025 17:00:27 +0800 Subject: [PATCH] feat: activate cities in seed files - Update active status of various cities from false to true - Ensures that all seeded cities are now enabled and available for usage This change activates previously inactive cities in the seed files, which facilitates their accessibility in subsequent deployments and testing. The modification was made across numerous city seed files to ensure a consistent state where all cities are now marked as active, improving the readiness of the application. --- db/seeds/cities/australia.rb | 4 +- db/seeds/cities/bangladesh.rb | 2 +- db/seeds/cities/brazil.rb | 2 +- db/seeds/cities/canada.rb | 2 +- db/seeds/cities/china.rb | 70 ++++++++++++++++----------------- db/seeds/cities/egypt.rb | 2 +- db/seeds/cities/france.rb | 2 +- db/seeds/cities/germany.rb | 4 +- db/seeds/cities/india.rb | 4 +- db/seeds/cities/japan.rb | 4 +- db/seeds/cities/mexico.rb | 2 +- db/seeds/cities/nigeria.rb | 2 +- db/seeds/cities/pakistan.rb | 2 +- db/seeds/cities/russia.rb | 4 +- db/seeds/cities/saudi_arabia.rb | 2 +- db/seeds/cities/singapore.rb | 2 +- db/seeds/cities/south_korea.rb | 2 +- db/seeds/cities/thailand.rb | 2 +- db/seeds/cities/turkey.rb | 4 +- db/seeds/cities/uk.rb | 2 +- db/seeds/cities/usa.rb | 8 ++-- db/seeds/cities/vietnam.rb | 4 +- 22 files changed, 66 insertions(+), 66 deletions(-) diff --git a/db/seeds/cities/australia.rb b/db/seeds/cities/australia.rb index 26f947e..8f0468e 100644 --- a/db/seeds/cities/australia.rb +++ b/db/seeds/cities/australia.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 151.2093, country: australia, timezone: 'Australia/Sydney', - active: false, + active: true, priority: 80, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 144.9631, country: australia, timezone: 'Australia/Melbourne', - active: false, + active: true, priority: 75, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/bangladesh.rb b/db/seeds/cities/bangladesh.rb index e0e3b4e..2d05cd7 100644 --- a/db/seeds/cities/bangladesh.rb +++ b/db/seeds/cities/bangladesh.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 90.4125, country: bangladesh, timezone: 'Asia/Dhaka', - active: false, + active: true, priority: 85, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/brazil.rb b/db/seeds/cities/brazil.rb index 319224d..7634c82 100644 --- a/db/seeds/cities/brazil.rb +++ b/db/seeds/cities/brazil.rb @@ -7,7 +7,7 @@ City.create!([ longitude: -43.1729, country: brazil, timezone: 'America/Sao_Paulo', - active: false, + active: true, priority: 80, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/canada.rb b/db/seeds/cities/canada.rb index 48202ec..83f01c0 100644 --- a/db/seeds/cities/canada.rb +++ b/db/seeds/cities/canada.rb @@ -6,7 +6,7 @@ City.create!( priority: 50, country: canada, timezone: 'America/Toronto', - active: false, + active: true, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago ) diff --git a/db/seeds/cities/china.rb b/db/seeds/cities/china.rb index b1b3f66..9b51b94 100644 --- a/db/seeds/cities/china.rb +++ b/db/seeds/cities/china.rb @@ -29,7 +29,7 @@ City.create!([ longitude: 114.0579, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -51,7 +51,7 @@ City.create!([ longitude: 104.0668, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -62,7 +62,7 @@ City.create!([ longitude: 117.3616, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -73,7 +73,7 @@ City.create!([ longitude: 114.3055, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -84,7 +84,7 @@ City.create!([ longitude: 113.7518, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -95,7 +95,7 @@ City.create!([ longitude: 106.9123, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -106,7 +106,7 @@ City.create!([ longitude: 108.9398, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -117,7 +117,7 @@ City.create!([ longitude: 120.1551, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -128,7 +128,7 @@ City.create!([ longitude: 113.1216, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -139,7 +139,7 @@ City.create!([ longitude: 118.7969, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -150,7 +150,7 @@ City.create!([ longitude: 114.1694, country: china, timezone: 'Asia/Hong_Kong', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -161,7 +161,7 @@ City.create!([ longitude: 123.4315, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -172,7 +172,7 @@ City.create!([ longitude: 113.6249, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -183,7 +183,7 @@ City.create!([ longitude: 120.3826, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -194,7 +194,7 @@ City.create!([ longitude: 120.5853, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -205,7 +205,7 @@ City.create!([ longitude: 112.9388, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -216,7 +216,7 @@ City.create!([ longitude: 117.1201, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -227,7 +227,7 @@ City.create!([ longitude: 102.7183, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -238,7 +238,7 @@ City.create!([ longitude: 126.5340, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -249,7 +249,7 @@ City.create!([ longitude: 114.5149, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -260,7 +260,7 @@ City.create!([ longitude: 117.2272, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -271,7 +271,7 @@ City.create!([ longitude: 121.6147, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -282,7 +282,7 @@ City.create!([ longitude: 118.0819, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -293,7 +293,7 @@ City.create!([ longitude: 108.3665, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -304,7 +304,7 @@ City.create!([ longitude: 125.3235, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -315,7 +315,7 @@ City.create!([ longitude: 112.5489, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -326,7 +326,7 @@ City.create!([ longitude: 121.4657, country: china, timezone: 'Asia/Taipei', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -337,7 +337,7 @@ City.create!([ longitude: 106.6302, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -348,7 +348,7 @@ City.create!([ longitude: 120.3119, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -359,7 +359,7 @@ City.create!([ longitude: 116.6822, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -370,7 +370,7 @@ City.create!([ longitude: 87.6168, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -381,7 +381,7 @@ City.create!([ longitude: 113.3926, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -392,7 +392,7 @@ City.create!([ longitude: 121.5440, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -403,7 +403,7 @@ City.create!([ longitude: 119.2965, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -414,7 +414,7 @@ City.create!([ longitude: 115.8579, country: china, timezone: 'Asia/Shanghai', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/egypt.rb b/db/seeds/cities/egypt.rb index b549383..2af57ae 100644 --- a/db/seeds/cities/egypt.rb +++ b/db/seeds/cities/egypt.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 29.9187, country: egypt, timezone: 'Africa/Cairo', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/france.rb b/db/seeds/cities/france.rb index dc4531a..6088fc1 100644 --- a/db/seeds/cities/france.rb +++ b/db/seeds/cities/france.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 2.3522, country: france, timezone: 'Europe/Paris', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/germany.rb b/db/seeds/cities/germany.rb index 8adfcfa..52e0f57 100644 --- a/db/seeds/cities/germany.rb +++ b/db/seeds/cities/germany.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 8.6821, country: germany, timezone: 'Europe/Berlin', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 13.4050, country: germany, timezone: 'Europe/Berlin', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/india.rb b/db/seeds/cities/india.rb index ff4f0b8..1f1b523 100644 --- a/db/seeds/cities/india.rb +++ b/db/seeds/cities/india.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 72.8777, country: india, timezone: 'Asia/Kolkata', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 77.5946, country: india, timezone: 'Asia/Kolkata', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/japan.rb b/db/seeds/cities/japan.rb index 01a6a3c..6601b9c 100644 --- a/db/seeds/cities/japan.rb +++ b/db/seeds/cities/japan.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 139.6503, country: japan, timezone: 'Asia/Tokyo', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 139.6380, country: japan, timezone: 'Asia/Tokyo', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/mexico.rb b/db/seeds/cities/mexico.rb index e68ab00..4f8747c 100644 --- a/db/seeds/cities/mexico.rb +++ b/db/seeds/cities/mexico.rb @@ -7,7 +7,7 @@ City.create!([ longitude: -99.1332, country: mexico, timezone: 'America/Mexico_City', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/nigeria.rb b/db/seeds/cities/nigeria.rb index 3c7d3c1..ab44ef6 100644 --- a/db/seeds/cities/nigeria.rb +++ b/db/seeds/cities/nigeria.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 3.3792, country: nigeria, timezone: 'Africa/Lagos', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/pakistan.rb b/db/seeds/cities/pakistan.rb index 9fc1a73..6807e4e 100644 --- a/db/seeds/cities/pakistan.rb +++ b/db/seeds/cities/pakistan.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 74.3587, country: pakistan, timezone: 'Asia/Karachi', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/russia.rb b/db/seeds/cities/russia.rb index bcbbf2b..fb15784 100644 --- a/db/seeds/cities/russia.rb +++ b/db/seeds/cities/russia.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 37.6173, country: russia, timezone: 'Europe/Moscow', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 30.3609, country: russia, timezone: 'Europe/Moscow', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/saudi_arabia.rb b/db/seeds/cities/saudi_arabia.rb index afcfe17..cbd407a 100644 --- a/db/seeds/cities/saudi_arabia.rb +++ b/db/seeds/cities/saudi_arabia.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 46.6753, country: saudi_arabia, timezone: 'Asia/Riyadh', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/singapore.rb b/db/seeds/cities/singapore.rb index 0de9428..bd64433 100644 --- a/db/seeds/cities/singapore.rb +++ b/db/seeds/cities/singapore.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 103.8198, country: singapore, timezone: 'Asia/Singapore', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/south_korea.rb b/db/seeds/cities/south_korea.rb index a7357cc..7398f3f 100644 --- a/db/seeds/cities/south_korea.rb +++ b/db/seeds/cities/south_korea.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 126.9780, country: south_korea, timezone: 'Asia/Seoul', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/thailand.rb b/db/seeds/cities/thailand.rb index 6ba2909..c62c18a 100644 --- a/db/seeds/cities/thailand.rb +++ b/db/seeds/cities/thailand.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 100.5018, country: thailand, timezone: 'Asia/Bangkok', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/turkey.rb b/db/seeds/cities/turkey.rb index 6a72301..909b944 100644 --- a/db/seeds/cities/turkey.rb +++ b/db/seeds/cities/turkey.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 28.9784, country: turkey, timezone: 'Europe/Istanbul', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 32.8597, country: turkey, timezone: 'Europe/Istanbul', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/uk.rb b/db/seeds/cities/uk.rb index 054757e..4bd8117 100644 --- a/db/seeds/cities/uk.rb +++ b/db/seeds/cities/uk.rb @@ -7,7 +7,7 @@ City.create!([ longitude: -0.1278, country: uk, timezone: 'Europe/London', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/usa.rb b/db/seeds/cities/usa.rb index 56a943f..012d53a 100644 --- a/db/seeds/cities/usa.rb +++ b/db/seeds/cities/usa.rb @@ -7,7 +7,7 @@ City.create!([ longitude: -122.4194, country: usa, timezone: 'America/Los_Angeles', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: -87.6298, country: usa, timezone: 'America/Chicago', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -29,7 +29,7 @@ City.create!([ longitude: -74.0060, country: usa, timezone: 'America/New_York', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -40,7 +40,7 @@ City.create!([ longitude: -118.2437, country: usa, timezone: 'America/Los_Angeles', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago diff --git a/db/seeds/cities/vietnam.rb b/db/seeds/cities/vietnam.rb index 76457fa..fed8650 100644 --- a/db/seeds/cities/vietnam.rb +++ b/db/seeds/cities/vietnam.rb @@ -7,7 +7,7 @@ City.create!([ longitude: 106.6297, country: vietnam, timezone: 'Asia/Ho_Chi_Minh', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago @@ -18,7 +18,7 @@ City.create!([ longitude: 105.8542, country: vietnam, timezone: 'Asia/Ho_Chi_Minh', - active: false, + active: true, priority: 100, last_weather_fetch: 10.hours.ago, last_image_generation: 10.hours.ago