Class: AddStateToUser

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/branston/db/migrate/20100723161424_add_state_to_user.rb

Class Method Summary collapse

Class Method Details

.downObject



7
8
9
10
# File 'lib/branston/db/migrate/20100723161424_add_state_to_user.rb', line 7

def self.down
  remove_column :users, :state
  remove_column :users, :deleted_at
end

.upObject



2
3
4
5
# File 'lib/branston/db/migrate/20100723161424_add_state_to_user.rb', line 2

def self.up
  add_column :users, :state, :string, :null => :no, :default => 'passive'
  add_column :users, :deleted_at, :datetime
end