From 0192efb37b697eddda788fc153b0d44f539b386b Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Tue, 21 Dec 2021 21:24:23 +0300 Subject: [PATCH] FIX: Remove length constraint of `fancy_title` in `topics` (#15381) The `fancy_title` column in the `topics` table currently has a constraint that limits the column to 400 characters. We need to remove that constraint because it causes some automatic topics/PMs from the system to fail when using Discourse in locales that need more than 400 characters to the translate the content of those automatic messages. Internal ticket: t58030. --- app/models/topic.rb | 2 +- ...0211221164540_remove_limit_for_fancy_title_in_topics.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20211221164540_remove_limit_for_fancy_title_in_topics.rb diff --git a/app/models/topic.rb b/app/models/topic.rb index c9713bef3e2..1f835e4237a 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -1887,7 +1887,7 @@ end # excerpt :string # pinned_globally :boolean default(FALSE), not null # pinned_until :datetime -# fancy_title :string(400) +# fancy_title :string # highest_staff_post_number :integer default(0), not null # featured_link :string # reviewable_score :float default(0.0), not null diff --git a/db/migrate/20211221164540_remove_limit_for_fancy_title_in_topics.rb b/db/migrate/20211221164540_remove_limit_for_fancy_title_in_topics.rb new file mode 100644 index 00000000000..f1200109a7d --- /dev/null +++ b/db/migrate/20211221164540_remove_limit_for_fancy_title_in_topics.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class RemoveLimitForFancyTitleInTopics < ActiveRecord::Migration[6.1] + def change + change_column :topics, :fancy_title, :string, limit: nil + end +end