Commit Graph

6 Commits

Author SHA1 Message Date
e774b3e736 fix: correct subregion initialization by name
- Change the method of finding or initializing subregions to use
  the name attribute instead of the id.
- This improves accuracy when synchronizing subregion data, as it
  ensures that subregions are correctly matched by name.
- Eliminates potential issues with duplicate IDs if they happen
  to be reused across different data sources.
2025-02-10 17:21:29 +08:00
bafb889144 refactor: change region identification method
- Update the region lookup to use `name` instead of `id`
- This change allows for more flexible region identification
- Improves alignment with potential data structure changes
2025-02-10 17:19:58 +08:00
27100aec24 fix: improve country creation logic
- Change method from find_or_create_by to find and check for nil
- Initialize a new Country object only if none exists

This fix addresses the potential issue where a country
is being unnecessarily created instead of found, improving
the efficiency of the country data synchronization process.
This change also adds clarity to the method's intent by
clearly separating the find and the initialization logic.
2025-02-10 17:07:48 +08:00
3f1e8892f9 chore: update AWS SDK dependencies and improve schema
- Downgraded `aws-sdk-s3` to version 1.170 and updated
  `aws-sdk-core` to 3.211 to maintain compatibility with
  existing code.
- Updated various column types in the database schema
  from `integer` to `bigint` to handle larger values and
  improve data integrity.
- Modified the `sync_geo_data.rake` task to use
  `find_or_create_by` for `Country`, improving the logic
  for ensuring unique countries based on ISO code.

These changes enhance dependency management and improve
schema robustness while maintaining functionality.
2025-02-10 14:43:34 +08:00
652107d0ee migrate with countries_states_cities_db 2025-02-08 17:42:50 +08:00
8517905b68 init with rails8 + active-admin 2025-01-19 01:13:59 +08:00