Add ability to translate server rules (#34494)
This commit is contained in:
parent
977164decc
commit
8c51a8ba94
17 changed files with 149 additions and 20 deletions
16
db/migrate/20250520204643_create_rule_translations.rb
Normal file
16
db/migrate/20250520204643_create_rule_translations.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue