Sha256: 56545e87955a0f91d4c1e0a5e7cf96e0a196295f7956d4fd3faee4551abc51c1

Contents?: true

Size: 287 Bytes

Versions: 5

Compression:

Stored size: 287 Bytes

Contents

class RemoveIsAdminPropertyAndAddRoleInstead < ActiveRecord::Migration
  def self.up
    remove_column :users, :is_admin
    add_column :users, :role, :string
  end

  def self.down
    add_column :users, :is_admin, :boolean, :default => false
    remove_column :users, :role
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
branston-0.6.6 lib/branston/db/migrate/20110408162438_remove_is_admin_property_and_add_role_instead.rb
branston-0.6.5 lib/branston/db/migrate/20110408162438_remove_is_admin_property_and_add_role_instead.rb
branston-0.6.4 lib/branston/db/migrate/20110408162438_remove_is_admin_property_and_add_role_instead.rb
branston-0.6.3 lib/branston/db/migrate/20110408162438_remove_is_admin_property_and_add_role_instead.rb
branston-0.6.2 lib/branston/db/migrate/20110408162438_remove_is_admin_property_and_add_role_instead.rb