Closed rudokemper closed 5 years ago
The seed data in this branch has this issue: https://github.com/rubyforgood/terrastories/tree/170-terrastories-generic-content
The precision and scale for the lat
and long
types should be adjusted to a quantity optimal for coordinates, like 10/6.
Latitude goes from -90 to 90, but Longitude goes from -180 to 180. However, the current limit for the decimal type seems to be set at for 2 integers.
Trying to seed a point with the coordinate of the location of Ruby by the Bay (-122.537419, 37.832257) currently results in the following rake error:
ActiveRecord::RangeError: Mysql2::Error: Out of range value for column 'lng' at row 1: INSERT INTO `points` (`title`, `lng`, `lat`, `created_at`, `updated_at`, `region`, `place_id`) VALUES ('Ruby By The Bay 2019', -122.537419, 37.832257, '2019-03-08 00:10:11', '2019-03-08 00:10:11', 'California', 7)