Handle bigint helpers to consider columns passed being bigint
What does this MR do and why?
With Use bigint for new installations (#438124 - closed) new instances will have all IDs in bigint. This MR updates the helpers around bigint convertion to not re-create the conversion steps for such IDs.
Available bigint helpers:
- initialize_conversion_of_integer_to_bigint -> does not generate
_convert_to_bigintcolumns for existing bigint columns.- Updated docs to advise not to commit this schema changes to
db/structure.sql
- Updated docs to advise not to commit this schema changes to
- revert_initialize_conversion_of_integer_to_bigint -> not needed, as both remove_rename_triggers and remove_column safe deletes.
- restore_conversion_of_integer_to_bigint -> after cleanup_conversion_of_integer_to_bigint the int4 columns would have been converted to int8, so it just carries on the usual process.
- backfill_conversion_of_integer_to_bigint -> does not change the arguments and keeps using the full list of columns since it checks if
_convert_to_bigintcolumns exist before doing the assignments. - revert_backfill_conversion_of_integer_to_bigint -> does not change the arguments and keeps using the full list of columns as (4).
Note:
There is no helper for swapping the column (N+1), I think it can be handled manually.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #498681 (closed)
Edited by Tianwen Chen