discourse/db/migrate/20240722025822_add_user_id_to_custom_emojis.rb
锦心 199f980e6a
FEATURE: Add creator and logging for CustomEmoji (#28004)
* FEATURE: Add logging for CustomEmoji

We didn't provide any logs for CustomEmoji before, nor did we record the
person who added any emoji in the database. As a result, the staff had
no way to trace back who added a certain emoji.

This commit adds a new column `user_id` to `custom_emojis` to record the
creator of an emoji. At the same time, a log is added for staff logs to
record who added or deleted a custom emoji.
2024-07-22 14:44:49 +08:00

7 lines
190 B
Ruby

# frozen_string_literal: true
class AddUserIdToCustomEmojis < ActiveRecord::Migration[7.1]
def change
add_column :custom_emojis, :user_id, :integer, null: false, default: -1
end
end