Class: CreateBadges

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/badgeable_active_record/generators/templates/badge_migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
# File 'lib/badgeable_active_record/generators/templates/badge_migration.rb', line 2

def change
  create_table :badges do |t|
    t.string :name
    t.string :description
    t.string :icon
  end

  add_index :badges, :name
end