Files
discourse/db/migrate/20250603051201_create_reviewable_notes.rb
Gary Pendergast 599404de31 DEV: Add a ReviewableNote model, and tie it into the Reviewable model. (#33047)
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.
2025-06-04 09:33:02 +10:00

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