removed user 'donor?' method and changed default badge_id from 0 to 1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user