mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:43:16 +08:00
DEV: Drop unused column translation_overrides.compiled_js
This commit is contained in:
parent
be33363f13
commit
bee8214399
|
@ -1,6 +1,11 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class TranslationOverride < ActiveRecord::Base
|
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
|
# Allowlist i18n interpolation keys that can be included when customizing translations
|
||||||
ALLOWED_CUSTOM_INTERPOLATION_KEYS = {
|
ALLOWED_CUSTOM_INTERPOLATION_KEYS = {
|
||||||
%w[
|
%w[
|
||||||
|
@ -216,7 +221,6 @@ end
|
||||||
# value :string not null
|
# value :string not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# compiled_js :text
|
|
||||||
# original_translation :text
|
# original_translation :text
|
||||||
# status :integer default("up_to_date"), not null
|
# status :integer default("up_to_date"), not null
|
||||||
#
|
#
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue
Block a user