class CreateBeetleReporterReports < ActiveRecord::Migration[6.1] def change create_table :beetle_reporter_reports do |t| t.bigint :record_id t.string :record_type t.string :reason t.bigint :user_id t.bigint :user_ids, array: true, default: [] t.string :reasons, array: true, default: [] t.integer :reported_count, default: 0 t.string :device_id t.string :aasm_state t.string :treatment_reason t.datetime :discarded_at t.timestamps end add_index :beetle_reporter_reports, :discarded_at end end