1
0
mirror of https://github.com/discourse/discourse.git synced 2025-03-06 03:09:43 +00:00
discourse/db/migrate/20150731225331_migrate_old_moved_posts.rb

9 lines
408 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class MigrateOldMovedPosts < ActiveRecord::Migration[4.2]
def up
execute "UPDATE posts SET post_type = 3, action_code = 'split_topic' WHERE post_type = 2 AND raw ~* '^I moved [a\\d]+ posts? to a new topic:'"
execute "UPDATE posts SET post_type = 3, action_code = 'split_topic' WHERE post_type = 2 AND raw ~* '^I moved [a\\d]+ posts? to an existing topic:'"
end
end