removed user 'donor?' method and changed default badge_id from 0 to 1

This commit is contained in:
MrYummy
2017-06-18 18:51:01 +02:00
parent d4159d886f
commit aff7deb310
3 changed files with 3 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ class AddBadgeIdToUsers < ActiveRecord::Migration
Badge.create!({name: "none", symbol: "", color: "#000"})
dbadge = Badge.create!({name: "donor", symbol: "$", color: "#f60"})
add_column :users, :badge_id, :integer, default: 0
add_column :users, :badge_id, :integer, default: 1
User.where(donor: true).update_all(badge_id: dbadge.id)
remove_column :users, :donor
end