mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
9 lines
408 B
Ruby
9 lines
408 B
Ruby
# 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
|