Migrate namespaces.traversal_ids from int4[] to int8[]
GitLab is undergoing a gradual process to migrate primary keys from int4 to int8. This process is documented at https://docs.gitlab.com/ee/development/database/avoiding_downtime_in_migrations.html#migrating-integer-primary-keys-to-bigint. Urgent tables have already migrated. int8 has been the standard Ruby on Rails primary key size for some years.
The namespaces.traversal_ids is an int4 array that references namespaces.id which is currently an int4. This issue is to migrate namespace.traversal_ids from an int4[] to an int8[].
The following discussion from !61974 (closed) should be addressed:
-
@ayufan started a discussion: I wish these things would be catched early with this
_ids. I see the following:- in some cases I saw a mention that
_id intis acceptable, as related column is int => it is not -
_idand_idsI don't believe we cover and ensure, and enforce that these arebigintinstead we rely on database review process which did not work in this case - I did not see anywhere a mention in our guidelines (I might be wrong here) that
idshould always bebigintit rather seems to be an internal untold truth
- in some cases I saw a mention that
Availability and Testing
- Please run
e2e:package-and-teston related MR(s) if it is not triggered automatically. Feel free to reach out to@vburtonwith any questions on QA failures.
Edited by Valerie Burton