summaryrefslogtreecommitdiff
path: root/db/post_migrate/20190715044501_add_unique_issue_id_sha_index_to_versions.rb
Commit message (Collapse)AuthorAgeFilesLines
* Migrations for adding issue_id to versions tableLuke Duncalfe2019-07-291-0/+17
These migrations do the following: - Adds a new `issue_id` column to `versions`. This fixes an n+1 problem when loading versions for an issue in GraphQL as AR can now load from cache - Change the unique restraint on versions.sha to be scoped to `issue_id` as in order to import version data, we need to allow duplicate `sha` values for versions - Update all versions with an `issue_id` https://gitlab.com/gitlab-org/gitlab-ee/issues/11090