mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
23a74ecf8f
This commits adds a database migration to limit the user status to 100 characters, limits the user status in the UI and makes sure that the emoji is valid. Follow up to commit b6f75e231cb49455908c980e0549290828c2162f.
13 lines
325 B
Ruby
13 lines
325 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TruncateUserStatusTo100Characters < ActiveRecord::Migration[7.0]
|
|
def up
|
|
execute "UPDATE user_statuses SET description = left(description, 100)"
|
|
execute "UPDATE user_statuses SET emoji = left(emoji, 100)"
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|