Added badge system
This commit is contained in:
8
db/migrate/20170319193517_add_badge_id_to_users.rb
Normal file
8
db/migrate/20170319193517_add_badge_id_to_users.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class AddBadgeIdToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :badge_id, :integer
|
||||
add_column :users, :badge_id, :integer, default: 0
|
||||
User.where(donor: true).update_all(badge_id: 1)
|
||||
remove_column :users, :donor
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user