mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
14 lines
345 B
Ruby
14 lines
345 B
Ruby
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
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :badges, [:name], unique: true
|
|
end
|
|
end
|