summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-29 21:09:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-29 21:09:35 +0000
commit6bab37419c31a78d57245c29fd05ec19ae0baed5 (patch)
treea629f50d1b45c0af8027d428b73f4ebf30067ae2 /db
parent5c2377d19572bdaaa6026fa6be131c3649074b36 (diff)
downloadgitlab-ce-6bab37419c31a78d57245c29fd05ec19ae0baed5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200923071622_add_description_to_requirements.rb15
-rw-r--r--db/migrate/20200923071644_add_text_limit_to_requirements_description.rb17
-rw-r--r--db/schema_migrations/202009230716221
-rw-r--r--db/schema_migrations/202009230716441
-rw-r--r--db/structure.sql5
5 files changed, 38 insertions, 1 deletions
diff --git a/db/migrate/20200923071622_add_description_to_requirements.rb b/db/migrate/20200923071622_add_description_to_requirements.rb
new file mode 100644
index 00000000000..b4b1250c10a
--- /dev/null
+++ b/db/migrate/20200923071622_add_description_to_requirements.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddDescriptionToRequirements < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit for description is added in 20200923071644_add_text_limit_to_requirements_description
+ # for description_html limit is not set because it's for caching purposes and
+ # its value is generated from `description`
+ def change
+ add_column :requirements, :description, :text
+ add_column :requirements, :description_html, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb b/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb
new file mode 100644
index 00000000000..0172d6bbba3
--- /dev/null
+++ b/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddTextLimitToRequirementsDescription < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :requirements, :description, 10_000
+ end
+
+ def down
+ remove_text_limit :requirements, :description
+ end
+end
diff --git a/db/schema_migrations/20200923071622 b/db/schema_migrations/20200923071622
new file mode 100644
index 00000000000..629b241ce0a
--- /dev/null
+++ b/db/schema_migrations/20200923071622
@@ -0,0 +1 @@
+1751fa6522a88582cb6a580acc95665f4e3f3a879f2365d5fd0a824ad1b4806d \ No newline at end of file
diff --git a/db/schema_migrations/20200923071644 b/db/schema_migrations/20200923071644
new file mode 100644
index 00000000000..431ed5af1f0
--- /dev/null
+++ b/db/schema_migrations/20200923071644
@@ -0,0 +1 @@
+0df2b1e65ef0dc563c55e575968e4fd768cec2e713e3b1c999cf584ef62b629d \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 0aa62171aac..d8367b0ab5a 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -15365,7 +15365,10 @@ CREATE TABLE requirements (
cached_markdown_version integer,
state smallint DEFAULT 1 NOT NULL,
title character varying(255) NOT NULL,
- title_html text
+ title_html text,
+ description text,
+ description_html text,
+ CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000))
);
CREATE SEQUENCE requirements_id_seq