Skip to content

Convert integer ID columns to bigint (for new installations)

Krasimir Angelov requested to merge 438124-convert-id-columns-to-bigint into master

What does this MR do and why?

This MR converts integer ID columns to bigint for test and development environments. This will result in new self-managed installations using bigint from the beginning, and this way not having to execute migrations. This will also give any new cells a wider range for unique ids.

Use bigint for new installations (#438124 - closed)

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.

  1. bundle exec rails db:migrate (to make sure db/migrate/20240703010000_convert_id_columns_to_bigint.rb has run)

  2. In the rails console execute the below commands.

    include Gitlab::Database::SchemaHelpers
    
    ActiveRecord::Base.connection.exec_query(find_all_id_columns_sql).rows
    
    # Should return an empty array

    Note: find_all_id_columns_sql fetches all integer IDs.

Related to #438124 (closed)

Edited by Prabakaran Murugesan

Merge request reports

Loading