diff options
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.rb | 10 |
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 |