diff options
Diffstat (limited to 'db/migrate/20210520102039_group_protected_environments_add_column.rb')
-rw-r--r-- | db/migrate/20210520102039_group_protected_environments_add_column.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20210520102039_group_protected_environments_add_column.rb b/db/migrate/20210520102039_group_protected_environments_add_column.rb new file mode 100644 index 00000000000..642e22c5f48 --- /dev/null +++ b/db/migrate/20210520102039_group_protected_environments_add_column.rb @@ -0,0 +1,15 @@ +# 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 |