summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-28 21:20:15 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-28 21:20:15 +0000
commit92d5172ad42ebc62eb78cac21b1e236ad6ace580 (patch)
treeca89437d4725caeb4e27682522061d3bab7e05b0 /db
parentf4a969f7f495978a7e656c69c929c9fdac111cff (diff)
downloadgitlab-ce-92d5172ad42ebc62eb78cac21b1e236ad6ace580.tar.gz
Add latest changes from gitlab-org/security/gitlab@13-3-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200717040735_change_aws_roles_role_arn_null.rb15
-rw-r--r--db/schema_migrations/202007170407351
-rw-r--r--db/structure.sql2
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
);