2014-03-05 07:52:20 -05:00
|
|
|
class CreateBadges < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :badges do |t|
|
|
|
|
t.string :name, null: false
|
|
|
|
t.text :description
|
|
|
|
t.integer :badge_type_id, index: true, null: false
|
|
|
|
t.integer :grant_count, null: false, default: 0
|
|
|
|
|
2017-08-07 11:48:36 -04:00
|
|
|
t.timestamps null: false
|
2014-03-05 07:52:20 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
add_index :badges, [:name], unique: true
|
|
|
|
end
|
|
|
|
end
|