This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/db/migrate/20150731225331_migrate_old_moved_posts.rb
2015-07-31 19:06:19 -04:00

7 lines
372 B
Ruby

class MigrateOldMovedPosts < ActiveRecord::Migration
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