From adf355567ce77ac80f2958649751d49a362502e6 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 20 Nov 2013 16:54:49 +1100 Subject: [PATCH] move emoji to correct location without a post rebake --- db/migrate/20131120055018_move_emoji_to_new_location.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20131120055018_move_emoji_to_new_location.rb diff --git a/db/migrate/20131120055018_move_emoji_to_new_location.rb b/db/migrate/20131120055018_move_emoji_to_new_location.rb new file mode 100644 index 000000000..b55336907 --- /dev/null +++ b/db/migrate/20131120055018_move_emoji_to_new_location.rb @@ -0,0 +1,9 @@ +class MoveEmojiToNewLocation < ActiveRecord::Migration + def up + execute("update posts set cooked = regexp_replace(cooked, '\(]*)assets\/emoji\/', '\\1plugins\/emoji\/images\/' , 'g') where cooked like '%emoji%'") + end + + def down + execute("update posts set cooked = regexp_replace(cooked, '\(]*)plugins\/emoji\/images\/', '\\1assets\/emoji\/' , 'g') where cooked like '%emoji%'") + end +end