summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-02-09 15:10:22 +0200
committerValery Sizov <valery@gitlab.com>2016-02-09 15:10:22 +0200
commit6c3cd241e87938373d31d5d4914fccda74145e02 (patch)
tree02e5f6d60a7b78bcfb8d35083e300e67003d5064
parent643c61867cc99f626d58798a5365e7573f90b176 (diff)
downloadgitlab-ce-index_snippet.tar.gz
Add index for snippet's updated_atindex_snippet
-rw-r--r--db/migrate/20160209130428_add_index_to_snippet.rb5
-rw-r--r--db/schema.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20160209130428_add_index_to_snippet.rb b/db/migrate/20160209130428_add_index_to_snippet.rb
new file mode 100644
index 00000000000..95d5719be59
--- /dev/null
+++ b/db/migrate/20160209130428_add_index_to_snippet.rb
@@ -0,0 +1,5 @@
+class AddIndexToSnippet < ActiveRecord::Migration
+ def change
+ add_index :snippets, :updated_at
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d4710346b82..87bca70b117 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160129135155) do
+ActiveRecord::Schema.define(version: 20160209130428) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -770,6 +770,7 @@ ActiveRecord::Schema.define(version: 20160129135155) do
add_index "snippets", ["created_at"], name: "index_snippets_on_created_at", using: :btree
add_index "snippets", ["expires_at"], name: "index_snippets_on_expires_at", using: :btree
add_index "snippets", ["project_id"], name: "index_snippets_on_project_id", using: :btree
+ add_index "snippets", ["updated_at"], name: "index_snippets_on_updated_at", using: :btree
add_index "snippets", ["visibility_level"], name: "index_snippets_on_visibility_level", using: :btree
create_table "spam_logs", force: :cascade do |t|