chore: Fix SMTP sentry issue (#4883)

* Fix SMTP sentry issue
This commit is contained in:
Aswin Dev P.S
2022-06-23 02:39:04 +05:30
committed by GitHub
parent f2dd88223f
commit d5ddc9d76c
6 changed files with 32 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
class RemoveSpecialCharactersFromInboxName < ActiveRecord::Migration[6.1]
def change
remove_special_characters_from_inbox_name
end
private
def remove_special_characters_from_inbox_name
::Inbox.find_in_batches do |inbox_batch|
Rails.logger.info "Migrated till #{inbox_batch.first.id}\n"
inbox_batch.each do |inbox|
inbox.name = inbox.name.gsub(/[^\w\s_]/, '')
inbox.save!
end
end
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_06_10_091206) do
ActiveRecord::Schema.define(version: 2022_06_16_154502) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"