summaryrefslogtreecommitdiff
path: root/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-05-11 22:43:58 +0200
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-05-11 22:43:58 +0200
commit4558b5b9fe9f648903ad0dc01089e6118fe0af34 (patch)
tree36903f41d1f773de3c8fc69592b714b8d9390e0f /db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
parent2f0d89ecff652418a8323990248b681a91f8e05b (diff)
downloadgitlab-ce-4558b5b9fe9f648903ad0dc01089e6118fe0af34.tar.gz
Incorporate feedback
Diffstat (limited to 'db/migrate/20160416182152_convert_award_note_to_emoji_award.rb')
-rw-r--r--db/migrate/20160416182152_convert_award_note_to_emoji_award.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
index 76f4a3aa6ae..d2efbd0abea 100644
--- a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
+++ b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
@@ -3,15 +3,5 @@ class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration
def up
execute "INSERT INTO award_emoji (awardable_type, awardable_id, user_id, name, created_at, updated_at) (SELECT noteable_type, noteable_id, author_id, note, created_at, updated_at FROM notes WHERE is_award = true)"
end
-
- def down
- execute <<-SQL
- INSERT INTO notes (noteable_type, noteable_id, author_id, note, created_at, updated_at, is_award)
- (SELECT awardable_type, awardable_id, user_id, name, created_at, updated_at, TRUE
- FROM award_emoji
- WHERE awardable_type IN ('Issue', 'MergeRequest')
- )
- SQL
- end
end
end