20160416180807_add_award_emoji.rb 350 Bytes
Newer Older
1
# rubocop:disable all
2 3 4 5 6 7 8 9 10 11 12
class AddAwardEmoji < ActiveRecord::Migration
  def change
    create_table :award_emoji do |t|
      t.string :name
      t.references :user
      t.references :awardable, polymorphic: true

      t.timestamps
    end

    add_index :award_emoji, :user_id
Z.J. van de Weg's avatar
Z.J. van de Weg committed
13
    add_index :award_emoji, [:awardable_type, :awardable_id]
14 15
  end
end