debian-mirror-gitlab/db/post_migrate/20210430135954_copy_adoption_segments_namespace.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
375 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
class CopyAdoptionSegmentsNamespace < ActiveRecord::Migration[6.0]
def up
execute <<-SQL
UPDATE analytics_devops_adoption_segments SET display_namespace_id = namespace_id
WHERE display_namespace_id IS NULL
SQL
end
def down
execute 'UPDATE analytics_devops_adoption_segments SET display_namespace_id = NULL'
end
end