today_ai_weather/db/seeds/cities/vietnam.rb
songtianlun c11d10c86a feat: update city display and database schema
- Change city name display to localized name in both index and show views
- Modify schema to use bigint for certain foreign keys
- Correct country codes in seeds for accurate data representation

These changes improve the handling of city names, ensuring they are displayed in the appropriate localized format and ensuring well-typed foreign key relationships in the schema.
2025-01-21 21:29:26 +08:00

27 lines
560 B
Ruby

vietnam = Country.find_by code: 'VN'
City.create!([
{
name: 'Ho Chi Minh City',
latitude: 10.8231,
longitude: 106.6297,
country: vietnam,
timezone: 'Asia/Ho_Chi_Minh',
active: true,
priority: 100,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
},
{
name: 'Hanoi',
latitude: 21.0285,
longitude: 105.8542,
country: vietnam,
timezone: 'Asia/Ho_Chi_Minh',
active: true,
priority: 100,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
}
])