mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 19:44:59 +08:00
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.
7 lines
160 B
Ruby
7 lines
160 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddLocaleToTopic < ActiveRecord::Migration[7.2]
|
|
def change
|
|
add_column :topics, :locale, :string, limit: 20
|
|
end
|
|
end
|