Skip to content

Add new ci_pipeline_metadata table with title column

Reuben Pereira requested to merge rp/pipeline-title-db into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Add a new table called ci_pipeline_metadata with a title column.

The title will be an optional attribute that can be set in the .gitlab-ci.yml file. The title is null: false in the table since it is the only column. There should be no row in ci_pipeline_metadata for a pipeline that doesn't have a title.

It was decided not to add the title column to the existing ci_pipelines table due to the large size of that table, and because we are unsure how often the title column will be used. See !97139 (comment 1103452493).

Migration output:

main: == 20220923103006 AddCiPipelineMetadataTitle: migrating =======================
main: -- create_table(:ci_pipeline_metadata, {:id=>false})
main: -- quote_column_name(:title)
main:    -> 0.0000s
main:    -> 0.0195s
main: == 20220923103006 AddCiPipelineMetadataTitle: migrated (0.0199s) ==============

Revert migration:

main: == 20220923103006 AddCiPipelineMetadataTitle: reverting ==============================
main: -- drop_table(:ci_pipeline_metadata)
main:    -> 0.0058s
main: == 20220923103006 AddCiPipelinesTitle: reverted (0.0065s) =====================

#372538 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Reuben Pereira

Merge request reports

Loading