diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-24 22:36:39 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-08-05 17:49:24 +0800 |
commit | 3f9b1ecdb3bbaab6ec35d28d066759985ce25e0e (patch) | |
tree | 32edef8386900cba11fbe38e53638ccfeb8134d5 /db/schema.rb | |
parent | afbe0b616b1e17f88bacc283a7a8fbe0bece580a (diff) | |
download | gitlab-ce-3f9b1ecdb3bbaab6ec35d28d066759985ce25e0e.tar.gz |
Use SQL to find the gap instead of iterating
Also removes unnecessary methods causing extra queries
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/schema.rb b/db/schema.rb index fe3fa597006..a9b7c1930e3 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_08_01_114109) do +ActiveRecord::Schema.define(version: 2019_08_02_012622) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" @@ -1716,7 +1716,7 @@ ActiveRecord::Schema.define(version: 2019_08_01_114109) do t.index ["project_id", "created_at", "id", "state"], name: "index_issues_on_project_id_and_created_at_and_id_and_state" t.index ["project_id", "due_date", "id", "state"], name: "idx_issues_on_project_id_and_due_date_and_id_and_state_partial", where: "(due_date IS NOT NULL)" t.index ["project_id", "iid"], name: "index_issues_on_project_id_and_iid", unique: true - t.index ["project_id", "state", "relative_position", "id"], name: "index_issues_on_project_id_and_state_and_rel_position_and_id", order: { id: :desc } + t.index ["project_id", "relative_position", "state", "id"], name: "index_issues_on_project_id_and_rel_position_and_state_and_id", order: { id: :desc } t.index ["project_id", "updated_at", "id", "state"], name: "index_issues_on_project_id_and_updated_at_and_id_and_state" t.index ["relative_position"], name: "index_issues_on_relative_position" t.index ["state"], name: "index_issues_on_state" |