diff options
Diffstat (limited to 'db/migrate/20211006103122_change_helm_channel_length.rb')
-rw-r--r-- | db/migrate/20211006103122_change_helm_channel_length.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20211006103122_change_helm_channel_length.rb b/db/migrate/20211006103122_change_helm_channel_length.rb new file mode 100644 index 00000000000..6579ca4053b --- /dev/null +++ b/db/migrate/20211006103122_change_helm_channel_length.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class ChangeHelmChannelLength < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit :packages_helm_file_metadata, :channel, 255, constraint_name: check_constraint_name(:packages_helm_file_metadata, :channel, 'max_length_v2') + remove_text_limit :packages_helm_file_metadata, :channel, constraint_name: check_constraint_name(:packages_helm_file_metadata, :channel, 'max_length') + end + + def down + # no-op: Danger of failing if there are records with length(channel) > 63 + end +end |