mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 11:25:15 +08:00
Change comma-delim site settings to pipe-delim
This commit is contained in:
31
db/migrate/20140407202158_site_setting_comma_to_pipe.rb
Normal file
31
db/migrate/20140407202158_site_setting_comma_to_pipe.rb
Normal file
@ -0,0 +1,31 @@
|
||||
class SiteSettingCommaToPipe < ActiveRecord::Migration
|
||||
def up
|
||||
execute <<SQL
|
||||
UPDATE site_settings
|
||||
SET value = replace(value, ',', '|')
|
||||
WHERE name = 'white_listed_spam_host_domains'
|
||||
;
|
||||
SQL
|
||||
execute <<SQL
|
||||
UPDATE site_settings
|
||||
SET value = replace(value, ',', '|')
|
||||
WHERE name = 'exclude_rel_nofollow_domains'
|
||||
;
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute <<SQL
|
||||
UPDATE site_settings
|
||||
SET value = replace(value, '|', ',')
|
||||
WHERE name = 'white_listed_spam_host_domains'
|
||||
;
|
||||
SQL
|
||||
execute <<SQL
|
||||
UPDATE site_settings
|
||||
SET value = replace(value, '|', ',')
|
||||
WHERE name = 'exclude_rel_nofollow_domains'
|
||||
;
|
||||
SQL
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user