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