This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
redstoner.com/db/migrate/20170319193517_add_badge_id_to_users.rb
2017-06-18 13:11:36 -04:00

9 lines
256 B
Ruby

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