summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-06-09 12:30:21 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-06-09 12:30:21 +0200
commit216436c1d48c4bafd2124fc656a06a6d1b430631 (patch)
treeb44a733c399855340d3982d39d750e3155f7c20f
parent3d72cb897efddc14021afe8b064aa2bff14c7c15 (diff)
downloadgitlab-ce-fix-migration-award-emoji.tar.gz
Fix migration when converting award notesfix-migration-award-emoji
-rw-r--r--db/migrate/20160416182152_convert_award_note_to_emoji_award.rb8
1 files changed, 3 insertions, 5 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 073bbc0fc2a..316f6f7dcfc 100644
--- a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
+++ b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
@@ -1,9 +1,7 @@
class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration
- def change
- 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)"
+ 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)"
- execute "DELETE FROM notes WHERE is_award = true"
- end
+ execute "DELETE FROM notes WHERE is_award = true"
end
end