discourse/db/migrate/20230127173249_truncate_use...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
325 B
Ruby
Raw Normal View History

# 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