diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-16 16:59:54 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-16 16:59:54 +0200 |
commit | 912f470497129b0d8759b18700299e38535e7bec (patch) | |
tree | 47d58838d15fb6de49f2e3a335df43db9e5b0348 /db | |
parent | 1b2a1d0ddd39ecc530c64563d0083e1e255f7c1a (diff) | |
download | gitlab-ce-912f470497129b0d8759b18700299e38535e7bec.tar.gz |
Fix ordering issue
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150916145038_add_index_for_committed_at_and_id.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb new file mode 100644 index 00000000000..78d9e5f61a1 --- /dev/null +++ b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb @@ -0,0 +1,5 @@ +class AddIndexForCommittedAtAndId < ActiveRecord::Migration + def change + add_index :ci_commits, [:project_id, :committed_at, :id] + end +end diff --git a/db/schema.rb b/db/schema.rb index 5fd764bf698..48314b8db6a 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: 20150914215247) do +ActiveRecord::Schema.define(version: 20150916145038) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -118,6 +118,7 @@ ActiveRecord::Schema.define(version: 20150914215247) do t.datetime "committed_at" end + add_index "ci_commits", ["project_id", "committed_at", "id"], name: "index_ci_commits_on_project_id_and_committed_at_and_id", using: :btree add_index "ci_commits", ["project_id", "committed_at"], name: "index_ci_commits_on_project_id_and_committed_at", using: :btree add_index "ci_commits", ["project_id", "sha"], name: "index_ci_commits_on_project_id_and_sha", using: :btree add_index "ci_commits", ["project_id"], name: "index_ci_commits_on_project_id", using: :btree |