Sha256: 771f1b8394873e5900e54c27921cf7f751f0ca24f7347b1aaf24c545aa66f86b

Contents?: true

Size: 372 Bytes

Versions: 12

Compression:

Stored size: 372 Bytes

Contents

class AddAdminFlagToUsers < ActiveRecord::Migration
  def self.up           
    change_table :users do |t|
      t.boolean :admin_flag, :default => false
    end
    # add_column :users, :admin_flag, :boolean, :default => false    
  end

  def self.down
    change_table :users do |t|
      t.remove :admin_flag
    end
    # remove_column :users, :admin_flag
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
roles_active_record-0.3.5 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.3.4 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.3.3 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.3.2 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.3.1 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.5 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.4 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.3 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.2 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.1 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.2.0 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb
roles_active_record-0.1.0 spec/migrations/admin_flag/004_add_admin_flag_to_users.rb