Skip to content
Snippets Groups Projects
20220815142111_create_complaint_votes.rb 333 B
Newer Older
ahcv19's avatar
ahcv19 committed
class CreateComplaintVotes < ActiveRecord::Migration[7.0]
  def change
    create_table :complaint_votes do |t|
      t.references :complainable, polymorphic: true, index: true
      t.integer :pros
      t.integer :cons

      t.timestamps
    end

    add_index :complaint_votes, [:complainable_id], name: 'complainable'
  end
end