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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 09:06:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 09:06:20 +0300
commit8e75748aabcbcea411f8bbc68936805bc2b5ff0c (patch)
tree9186d3e27c66b3680e2039d6769233750c74cc4b /db
parent98eaa8d2de5dd751d7a42fa5d601715064f14297 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191119023952_add_created_at_index_to_snippets.rb17
-rw-r--r--db/schema.rb3
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20191119023952_add_created_at_index_to_snippets.rb b/db/migrate/20191119023952_add_created_at_index_to_snippets.rb
new file mode 100644
index 00000000000..226af5f9e6d
--- /dev/null
+++ b/db/migrate/20191119023952_add_created_at_index_to_snippets.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddCreatedAtIndexToSnippets < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :snippets, :created_at
+ end
+
+ def down
+ remove_concurrent_index :snippets, :created_at
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 652f4a316e1..8777e6394d8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2019_11_18_182722) do
+ActiveRecord::Schema.define(version: 2019_11_19_023952) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -3628,6 +3628,7 @@ ActiveRecord::Schema.define(version: 2019_11_18_182722) do
t.boolean "secret", default: false, null: false
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["content"], name: "index_snippets_on_content_trigram", opclass: :gin_trgm_ops, using: :gin
+ t.index ["created_at"], name: "index_snippets_on_created_at"
t.index ["file_name"], name: "index_snippets_on_file_name_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["project_id", "visibility_level"], name: "index_snippets_on_project_id_and_visibility_level"
t.index ["title"], name: "index_snippets_on_title_trigram", opclass: :gin_trgm_ops, using: :gin