Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-05-24 13:25:12 +0300
committerSean McGivern <sean@gitlab.com>2017-12-11 13:49:23 +0300
commit43442be4e594113913206c0739c031189ce5b70d (patch)
tree07d049ab20aa624d80d8ae413cbef4c7bb67aa83 /db
parentb1aa91fbacda5987cfac7103308eb7bd0589b720 (diff)
Fix specs after removing assignee_id field
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170523073948_remove_assignee_id_from_issue.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/migrate/20170523073948_remove_assignee_id_from_issue.rb b/db/migrate/20170523073948_remove_assignee_id_from_issue.rb
index e310a6df9bd..6fe2bb9c770 100644
--- a/db/migrate/20170523073948_remove_assignee_id_from_issue.rb
+++ b/db/migrate/20170523073948_remove_assignee_id_from_issue.rb
@@ -32,5 +32,7 @@ class RemoveAssigneeIdFromIssue < ActiveRecord::Migration
def down
add_column :issues, :assignee_id, :integer
add_concurrent_index :issues, :assignee_id
+
+ execute('UPDATE issues SET assignee_id = (SELECT user_id FROM issue_assignees WHERE issue_assignees.issue_id = issues.id LIMIT 1)')
end
end