today_ai_weather/db/seeds/cities/japan.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
534 B
Ruby

japan = Country.find_by code: 'JP'
City.create!([
{
name: 'Tokyo',
latitude: 35.6762,
longitude: 139.6503,
country: japan,
timezone: 'Asia/Tokyo',
active: true,
priority: 100,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
},
{
name: 'Yokohama',
latitude: 35.4437,
longitude: 139.6380,
country: japan,
timezone: 'Asia/Tokyo',
active: true,
priority: 100,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
}
])