Bug #17270
closedRunning out of IDs in logs table
Description
Hello,
I saw this on production.log:
2016-11-08 14:10:52 92eac1ed [sql] [D] SQL (1.0ms) INSERT INTO "logs" ("message_id", "source_id", "report_id", "level_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["message_id", 16056395], ["source_id", 2], ["report_id", 232689215], ["level_id", 4], ["created_at", "2016-11-08 13:10:52.062919"], ["updated_at", "2016-11-08 13:10:52.062919"]]
2016-11-08 14:10:52 92eac1ed [sql] [D] (0.1ms) ROLLBACK
2016-11-08 14:10:52 92eac1ed [app] [W] Action failed
| PG::Error: ERROR: integer out of range
...
And checking the database, I've run out IDs in logs table:
foreman=# insert into logs (message_id, source_id, report_id, level_id, created_at, updated_at) values (16056395, 2, 232689215, 4, '2016-11-08 13:10:52.062919', '2016-11-08 13:10:52.062919');
ERROR: integer out of range
foreman=# select max(id) from logs;
max
------------
2147483647
(1 row)
Can we increase id column from integer to bigint?
Thanks.