diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-24 17:00:56 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-24 17:00:56 +0100 |
commit | f3650d2e5da4dc3624bcf4940825fe24266a91b4 (patch) | |
tree | bd8d0f798faeeaea090b458c1924b91922f30832 /db/migrate | |
parent | 515e9d51df5a890887248e74b7a96d47a5d0722c (diff) | |
download | gitlab-ce-f3650d2e5da4dc3624bcf4940825fe24266a91b4.tar.gz |
Add migration.unset-assignee
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb new file mode 100644 index 00000000000..42dc8173e46 --- /dev/null +++ b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb @@ -0,0 +1,6 @@ +class SetIncorrectAssigneeIdToNull < ActiveRecord::Migration + def up + execute "UPDATE issues SET assignee_id = NULL WHERE assignee_id = -1" + execute "UPDATE merge_requests SET assignee_id = NULL WHERE assignee_id = -1" + end +end |