debian-mirror-gitlab/db/migrate/20210520102039_group_protected_environments_add_column.rb

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

16 lines
432 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# frozen_string_literal: true
class GroupProtectedEnvironmentsAddColumn < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
def up
add_column :protected_environments, :group_id, :bigint
change_column_null :protected_environments, :project_id, true
end
def down
change_column_null :protected_environments, :project_id, false
remove_column :protected_environments, :group_id
end
end