mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 03:07:17 -05:00
DEV: Add locale for topics (#32619)
Similar to https://github.com/discourse/discourse/pull/32526. Reviewer note: There had been some deliberation if we should just take the `topic.first_post.locale` instead of having a `topic.locale`. Ultimately, titles may be of a different language of the post itself, and secondarily in some cases it could be faster without having to load the first_post at all.
This commit is contained in:
@@ -2233,6 +2233,7 @@ end
|
||||
# bannered_until :datetime
|
||||
# external_id :string
|
||||
# visibility_reason_id :integer
|
||||
# locale :string(20)
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddLocaleToTopic < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :topics, :locale, :string, limit: 20
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user