Bug #17999
closedFact values id exceeds mysql maximum
Description
The id column of the fact_values has a maximum of SIGNED INT (can support till 2147483647).
This leads to a lot of nice errors, when you hit the limit and breaks discovery host import.
Fact lldp_neighbor_mngaddr_ipv4_p5p1 could not be imported because of Mysql2::Error: Out of range value for column 'id' at row 1: INSERT INTO `fact_values` (`value`, `fact_name_id`, `host_id`, `created_at`, `updated_at`) VALUES ('192.168.200.14', 121854, 14343, '2017-01-10 09:37:26', '2017-01-10 09:37:26')
A quick fix is changing the id column from signed to unsigned. We might want to add a migration for this to make this a default.
UNSIGNED INT allows the double of SIGNED INT.
ALTER TABLE `fact_values` CHANGE `id` `id` INT UNSIGNED NOT NULL AUTO_INCREMENT;