summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-09 14:21:27 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-09 14:21:52 -0800
commitaaa7a065c6fff7c57b750fd50f73866afe7ba026 (patch)
tree52f57a02198f5ed32c2813c3be01142baf2321dd /db
parent86bb522713e8519e7b6c06f1fcb2cc752cc37212 (diff)
downloadgitlab-ce-aaa7a065c6fff7c57b750fd50f73866afe7ba026.tar.gz
Add index on order columns for services table
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150209222013_add_missing_index.rb5
-rw-r--r--db/schema.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20150209222013_add_missing_index.rb b/db/migrate/20150209222013_add_missing_index.rb
new file mode 100644
index 00000000000..a816c2e9e8c
--- /dev/null
+++ b/db/migrate/20150209222013_add_missing_index.rb
@@ -0,0 +1,5 @@
+class AddMissingIndex < ActiveRecord::Migration
+ def change
+ add_index "services", [:created_at, :id]
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 727d86eb767..8b6142a80a0 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: 20150206222854) do
+ActiveRecord::Schema.define(version: 20150209222013) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -367,6 +367,7 @@ ActiveRecord::Schema.define(version: 20150206222854) do
t.text "properties"
end
+ add_index "services", ["created_at", "id"], name: "index_services_on_created_at_and_id", using: :btree
add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree
create_table "snippets", force: true do |t|