Short story: storing identities in an integer field instead of a bigint.
Now would be a good time to check your own IDs and get the max value of each. Sure is easier to fix this ahead of time than when your app is down.
Now would be a good time to check your own IDs and get the max value of each. Sure is easier to fix this ahead of time than when your app is down.
Another thing I've done is use GUIDs for the primary key, then have an identity/sequence column called something like Sequence, which retains the sequencing capabilities of a regular integer identity column.
See https://www.percona.com/blog/2006/10/03/long-primary-key-for... for an interesting discussion of the topic.
In general, it's unwise to make recommendations about what data types to use, especially for primary keys, without thorough research on their implications.