mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-23 00:47:51 +00:00
18 lines
531 B
Ruby
18 lines
531 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddPackageRegistryInApplicationSetting < Gitlab::Database::Migration[2.2]
|
|
milestone '17.0'
|
|
disable_ddl_transaction!
|
|
|
|
CONSTRAINT_NAME = 'check_application_settings_package_registry_is_hash'
|
|
|
|
def up
|
|
add_column :application_settings, :package_registry, :jsonb, default: {}, null: false
|
|
add_check_constraint(:application_settings, "(jsonb_typeof(package_registry) = 'object')", CONSTRAINT_NAME)
|
|
end
|
|
|
|
def down
|
|
remove_column :application_settings, :package_registry
|
|
end
|
|
end
|