mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Initial badge system implementation.
This commit is contained in:
14
db/migrate/20140304201403_create_badges.rb
Normal file
14
db/migrate/20140304201403_create_badges.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user