Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200717040735_change_aws_roles_role_arn_null.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 707cfe96a7c91108dfce59d8187e9600f19c32eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class ChangeAwsRolesRoleArnNull < ActiveRecord::Migration[6.0]
  DOWNTIME = false
  EXAMPLE_ARN = 'arn:aws:iam::000000000000:role/example-role'

  def up
    change_column_null :aws_roles, :role_arn, true
  end

  def down
    # Records may now exist with nulls, so we must fill them with a dummy value
    change_column_null :aws_roles, :role_arn, false, EXAMPLE_ARN
  end
end