mirror of
https://github.com/discourse/discourse.git
synced 2026-03-03 23:54:20 +08:00
As part of the review queue refresh, moderators will be able to perform individual actions on each part of a reviewable (for example, hiding a post, and suspending the user). In order to know when a reviewable is "completed", we need to be able to check that the right number of actions have been performed on the reviewable. This change adds a `ReviewableActionLog` model where we can keep track of the actions that have been performed on each reviewable.
16 lines
470 B
Ruby
16 lines
470 B
Ruby
# frozen_string_literal: true
|
|
class CreateReviewableActionLogs < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :reviewable_action_logs do |t|
|
|
t.bigint :reviewable_id, null: false
|
|
t.string :action_key, null: false
|
|
t.integer :status, null: false
|
|
t.integer :performed_by_id, null: false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :reviewable_action_logs, :reviewable_id
|
|
add_index :reviewable_action_logs, :performed_by_id
|
|
end
|
|
end
|