Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table)
| ActiveRecord::StatementInvalid: Mysql2::Error: Out of range value for column 'id' at row 1: INSERT INTO `logs` (`created_at`, `level_id`, `message_id`, `report_id`, `source_id`, `updated_at`) VALUES ('2016-02-19 04:48:08', 1, 9, 128052331, 3, '2016-02-19 04:48:08')
#4 Updated by Jason Hane over 6 years ago
We just ran into a similar issue. I noticed the ID columns are not unsigned so I altered the tables to make them so. I believe that should be the default. Also at some point since we're purging reports after 90 days we could probably reset the auto increment to 1. Would that cause any issues?
#5 Updated by Dominic Cleal over 6 years ago
Jason, this is just a join table between reports/messages/sources, so they're not going to be referenced anywhere else. I don't know if MySQL will skip IDs that are already in use though if the logs aren't expired exactly in order, but I guess it's probably going to be OK.