From 92d5172ad42ebc62eb78cac21b1e236ad6ace580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 28 Aug 2020 21:20:15 +0000 Subject: Add latest changes from gitlab-org/security/gitlab@13-3-stable-ee --- .../20200717040735_change_aws_roles_role_arn_null.rb | 15 +++++++++++++++ db/schema_migrations/20200717040735 | 1 + db/structure.sql | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20200717040735_change_aws_roles_role_arn_null.rb create mode 100644 db/schema_migrations/20200717040735 (limited to 'db') 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 ); -- cgit v1.2.3