Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ discourse_ai:
area: "ai-features/translation"
ai_translation_backfill_max_age_days:
default: 5
min: 0
max: 20000
client: false
area: "ai-features/translation"
ai_translation_verbose_logs:
Expand Down
22 changes: 22 additions & 0 deletions db/migrate/20250717075002_set_translation_backfill_max_age.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true
class SetTranslationBackfillMaxAge < ActiveRecord::Migration[7.2]
def up
execute <<~SQL
UPDATE site_settings
SET value = '20000'
WHERE name = 'ai_translation_backfill_max_age_days'
AND value::integer > 20000;
SQL

execute <<~SQL
UPDATE site_settings
SET value = '0'
WHERE name = 'ai_translation_backfill_max_age_days'
AND value::integer < 0;
SQL
end

def down
raise ActiveRecord::IrreversibleMigration
end
end