mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: remove duplicate Remap class and use DbHelper.remap instead
Follow-up to 9cd3f96dee
This commit is contained in:
@@ -31,7 +31,7 @@ class DiscourseCLI < Thor
|
||||
option :regex, type: :boolean
|
||||
def remap(from, to)
|
||||
load_rails
|
||||
require 'remap'
|
||||
require 'db_helper'
|
||||
|
||||
if options[:regex]
|
||||
puts "Rewriting all occurences of #{from} to #{to} using regexp_replace"
|
||||
@@ -269,7 +269,7 @@ class DiscourseCLI < Thor
|
||||
|
||||
def do_remap(from, to, regex = false)
|
||||
begin
|
||||
Remap.new(from, to, regex: regex, verbose: true).perform
|
||||
regex ? DbHelper.regexp_replace(from, to) : DbHelper.remap(from, to)
|
||||
puts 'Done', ''
|
||||
rescue => ex
|
||||
puts "Error: #{ex}"
|
||||
|
||||
Reference in New Issue
Block a user