summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-02 00:11:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-02 00:11:26 +0000
commit30b8ad35feb7efb0587f44d8e7b371490634ee1c (patch)
treeebd11699a7e27c6e01aaa8d9ba72e64fe356ae61 /db
parent11b7785066d3e81916cbf653f4eb6568148f7e01 (diff)
downloadgitlab-ce-30b8ad35feb7efb0587f44d8e7b371490634ee1c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210224133337_add_name_field_to_cluster_agent_token.rb12
-rw-r--r--db/migrate/20210225135533_limit_cluster_token_size.rb17
-rw-r--r--db/schema_migrations/202102241333371
-rw-r--r--db/schema_migrations/202102251355331
-rw-r--r--db/structure.sql2
5 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20210224133337_add_name_field_to_cluster_agent_token.rb b/db/migrate/20210224133337_add_name_field_to_cluster_agent_token.rb
new file mode 100644
index 00000000000..2cec37f8477
--- /dev/null
+++ b/db/migrate/20210224133337_add_name_field_to_cluster_agent_token.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AddNameFieldToClusterAgentToken < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in LimitClusterTokenSize
+ def change
+ add_column :cluster_agent_tokens, :name, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20210225135533_limit_cluster_token_size.rb b/db/migrate/20210225135533_limit_cluster_token_size.rb
new file mode 100644
index 00000000000..6a1b6b7b4e8
--- /dev/null
+++ b/db/migrate/20210225135533_limit_cluster_token_size.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class LimitClusterTokenSize < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :cluster_agent_tokens, :name, 255
+ end
+
+ def down
+ remove_text_limit :cluster_agent_tokens, :name
+ end
+end
diff --git a/db/schema_migrations/20210224133337 b/db/schema_migrations/20210224133337
new file mode 100644
index 00000000000..d5dafb9fb56
--- /dev/null
+++ b/db/schema_migrations/20210224133337
@@ -0,0 +1 @@
+964e9f88018b2ab72fd370f6a8dccde218cfd4ffa3ccedf4f142ab341f5e858f \ No newline at end of file
diff --git a/db/schema_migrations/20210225135533 b/db/schema_migrations/20210225135533
new file mode 100644
index 00000000000..e7c24096aac
--- /dev/null
+++ b/db/schema_migrations/20210225135533
@@ -0,0 +1 @@
+526174bd42327e0212b15ffbad99541887de1dec35cc4c592d4f02065026b3ca \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 2f2c8cd588d..38f79b4810f 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11029,6 +11029,8 @@ CREATE TABLE cluster_agent_tokens (
token_encrypted text NOT NULL,
created_by_user_id bigint,
description text,
+ name text,
+ CONSTRAINT check_2b79dbb315 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_4e4ec5070a CHECK ((char_length(description) <= 1024)),
CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255))
);