class AddDefaultUser < ActiveRecord::Migration
  def self.up
    u = User.new
    u.login = "bbarker"
    u.email = "bob@gmail.com"
    u.first_name = "Bob"
    u.last_name = "Barker"
    u.password = "oranges"
    u.password_confirmation = "oranges"
    # To get the user usifyied instantly by restful_auth and aasm
    u.state = "active"
    u.activation_code = nil
    u.activated_at = Time.now
    # Make Bob an administrator
    u.is_admin = true
    u.save
  end

  def self.down
    # Please spay and neuter your pets
    User.find(:first, :conditions => { :login => "bbarker" }).destroy
  end
end
