DEV: Drop unused column translation_overrides.compiled_js

This commit is contained in:
Loïc Guitaut 2024-07-11 14:53:29 +02:00 committed by Loïc Guitaut
parent be33363f13
commit bee8214399
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,11 @@
# frozen_string_literal: true
class TranslationOverride < ActiveRecord::Base
# TODO: Remove once
# 20240711123755_drop_compiled_js_from_translation_overrides has been
# promoted to pre-deploy
self.ignored_columns = %w[compiled_js]
# Allowlist i18n interpolation keys that can be included when customizing translations
ALLOWED_CUSTOM_INTERPOLATION_KEYS = {
%w[
@ -216,7 +221,6 @@ end
# value :string not null
# created_at :datetime not null
# updated_at :datetime not null
# compiled_js :text
# original_translation :text
# status :integer default("up_to_date"), not null
#

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class DropCompiledJsFromTranslationOverrides < ActiveRecord::Migration[7.1]
DROPPED_COLUMNS ||= { translation_overrides: %i[compiled_js] }
def up
DROPPED_COLUMNS.each { |table, columns| Migration::ColumnDropper.execute_drop(table, columns) }
end
def down
raise ActiveRecord::IrreversibleMigration
end
end