-
Epic
-
Resolution: Unresolved
-
Normal
-
None
-
6.15.z, 6.16.z, 6.17.z
-
Switch primary keys to bigint
-
To Do
-
False
-
-
sat-rocket
-
None
-
None
-
None
As we can see from the related issues, time after time, we have seen reports about having some _seq has reached their max value, and that is because their datatype was set to integer (and so as for the relevant primary key e.g. id). Almost every time, the fix was to change the datatype for the main primary id of the table, as well as the relevant sequence to be bigint, which is also the Rails default.
Instead of users reporting these issues for different tables at different occasions and needing to apply the same fix again and again through new migrations, it would be good to invest some time, check the possible tables that have the potential to store a huge amount of data, and fix that table's primary key and the related sequence datatype to be bigint.