diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200717040735_change_aws_roles_role_arn_null.rb | 15 | ||||
-rw-r--r-- | db/schema_migrations/20200717040735 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb b/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb new file mode 100644 index 00000000000..707cfe96a7c --- /dev/null +++ b/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb @@ -0,0 +1,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 diff --git a/db/schema_migrations/20200717040735 b/db/schema_migrations/20200717040735 new file mode 100644 index 00000000000..6bfa1dd7261 --- /dev/null +++ b/db/schema_migrations/20200717040735 @@ -0,0 +1 @@ +6b8fa09c9700c494eeb5151f43064f1656eaaea804742629b7bd66483e2b04cb
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 033fc85305c..3e3014da914 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9514,7 +9514,7 @@ CREATE TABLE public.aws_roles ( user_id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - role_arn character varying(2048) NOT NULL, + role_arn character varying(2048), role_external_id character varying(64) NOT NULL ); |