This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/db/migrate/20140304201403_create_badges.rb

15 lines
345 B
Ruby
Raw Normal View History

2014-03-05 18:22:20 +05:30
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