Sha256: 5fa44573236c13a17c622b87652c7022708c3d452ea4396878965a424b8cdabb

Contents?: true

Size: 282 Bytes

Versions: 7

Compression:

Stored size: 282 Bytes

Contents

class AddAdminToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :admin, :boolean, null: false, default: false
    superuser = User.first
    superuser.update_attribute(:admin, true) if superuser
  end

  def self.down
    remove_column :users, :admin
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 db/migrate/20100928030618_add_admin_to_users.rb
fat_free_crm-0.14.1 db/migrate/20100928030618_add_admin_to_users.rb
fat_free_crm-0.15.0.beta.2 db/migrate/20100928030618_add_admin_to_users.rb
fat_free_crm-0.15.0.beta db/migrate/20100928030618_add_admin_to_users.rb
fat_free_crm-0.14.0 db/migrate/20100928030618_add_admin_to_users.rb
reduced_fat_crm-0.15.0.beta db/migrate/20100928030618_add_admin_to_users.rb
reduced_fat_crm-0.14.0 db/migrate/20100928030618_add_admin_to_users.rb