Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 17:34:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 17:34:42 +0300
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /db/migrate/20200213224220_add_sprints.rb
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'db/migrate/20200213224220_add_sprints.rb')
-rw-r--r--db/migrate/20200213224220_add_sprints.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/db/migrate/20200213224220_add_sprints.rb b/db/migrate/20200213224220_add_sprints.rb
new file mode 100644
index 00000000000..8d82d1e261a
--- /dev/null
+++ b/db/migrate/20200213224220_add_sprints.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+class AddSprints < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ create_table :sprints, id: :bigserial do |t|
+ t.timestamps_with_timezone null: false
+ t.date :start_date
+ t.date :due_date
+
+ t.references :project, foreign_key: false, index: false
+ t.references :group, foreign_key: false, index: true
+
+ t.integer :iid, null: false
+ t.integer :cached_markdown_version
+ t.integer :state, limit: 2
+ # rubocop:disable Migration/AddLimitToTextColumns
+ t.text :title, null: false
+ t.text :title_html
+ t.text :description
+ t.text :description_html
+ # rubocop:enable Migration/AddLimitToTextColumns
+
+ t.index :description, name: "index_sprints_on_description_trigram", opclass: :gin_trgm_ops, using: :gin
+ t.index :due_date
+ t.index %w(project_id iid), unique: true
+ t.index :title
+ t.index :title, name: "index_sprints_on_title_trigram", opclass: :gin_trgm_ops, using: :gin
+
+ t.index %w(project_id title), unique: true, where: 'project_id IS NOT NULL'
+ t.index %w(group_id title), unique: true, where: 'group_id IS NOT NULL'
+ end
+ end
+end