Skip to content

Support jsonb Default Value in add_column_with_default Migration Helper

Jason Goodman requested to merge support-jsonb-default-value into master

What does this MR do?

Add support for specifying a default value for a jsonb type column in the add_column_with_default migration helper.

For example:

add_column_with_default :operations_feature_flag_scopes, :strategies, :jsonb, default: [{ name: "default", parameters: {} }]

Related Issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/8240

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Jason Goodman

Merge request reports