diff options
Diffstat (limited to 'db/post_migrate/20210430130259_remove_obsolete_segments_field.rb')
-rw-r--r-- | db/post_migrate/20210430130259_remove_obsolete_segments_field.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20210430130259_remove_obsolete_segments_field.rb b/db/post_migrate/20210430130259_remove_obsolete_segments_field.rb new file mode 100644 index 00000000000..ffdd84582cb --- /dev/null +++ b/db/post_migrate/20210430130259_remove_obsolete_segments_field.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class RemoveObsoleteSegmentsField < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def up + with_lock_retries do + remove_column :analytics_devops_adoption_segments, :name + end + end + + def down + add_column :analytics_devops_adoption_segments, :name, :text + add_text_limit :analytics_devops_adoption_segments, :name, 255 + end +end |