trabajo-afectivo/db/migrate/20220318125144_issue4018_remove_old_translations.rb

10 lines
363 B
Ruby

# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Issue4018RemoveOldTranslations < ActiveRecord::Migration[6.0]
def change
# return if it's a new setup
return if !Setting.exists?(name: 'system_init_done')
Translation.where(source: 'FORMAT_DATE', is_synchronized_from_codebase: false).find_each(&:destroy)
end
end