class CreateTheatreComments < ActiveRecord::Migration[8.0]
  def change
    create_table :theatre_comments, primary_key: [:theatre_id, :no] do |t|
      t.references :theatre, null: false, foreign_key: { to_table: :theatres }
      t.integer :no, null: false
      t.references :user, foreign_key: { to_table: :users }
      t.text :content, null: false
      t.timestamps
      t.datetime :discarded_at, index: true
    end
  end
end
