Change id primary keys from integer (serial) to bigint (identity)
This MR does the following changes (following the recommendations/best practices discussed during the PostreSQL training):
-
Changes the type of the
id
primary keys frominteger
tobigint
. This is now the default for Rails 6 as well, and avoids running out of integer values. -
Changes the
id
columns increment strategy fromserial
to the new (PostgreSQL 10+)identity
. This is a general recommendation for PostgreSQL (see https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_serial).
Related to &2313 (closed).
Edited by João Pereira