Add ability to translate server rules (#34494)

This commit is contained in:
Claire 2025-05-21 13:54:12 +02:00 committed by GitHub
parent 977164decc
commit 8c51a8ba94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 149 additions and 20 deletions

View file

@ -0,0 +1,16 @@
# frozen_string_literal: true
class CreateRuleTranslations < ActiveRecord::Migration[8.0]
def change
create_table :rule_translations do |t|
t.text :text, null: false, default: ''
t.text :hint, null: false, default: ''
t.string :language, null: false
t.references :rule, null: false, foreign_key: { on_delete: :cascade }, index: false
t.timestamps
end
add_index :rule_translations, [:rule_id, :language], unique: true
end
end