mirror of
https://github.com/discourse/discourse.git
synced 2025-06-28 11:51:33 +08:00

As part of the review queue refresh, we'll be adding the ability for moderators to make notes on individual reviewable items. As a first step, this change adds the new model and associated backend code.
15 lines
400 B
Ruby
15 lines
400 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateReviewableNotes < ActiveRecord::Migration[7.0]
|
|
def change
|
|
create_table :reviewable_notes do |t|
|
|
t.references :reviewable, null: false, foreign_key: true
|
|
t.references :user, null: false, foreign_key: true
|
|
t.text :content, null: false
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :reviewable_notes, %i[reviewable_id created_at]
|
|
end
|
|
end
|