2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-03 23:54:20 +08:00
discourse/db/migrate/20251117002948_create_reviewable_action_logs.rb
Gary Pendergast 4a7032f56b
DEV: Add a new ReviewableActionLog model. (#36057)
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.
2025-11-17 15:45:33 +11:00

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