Sha256: bf283ac58f1d2ce5b6db4b595f94a1229f1b66d70f2e9813f08eb485fa9a6bc5

Contents?: true

Size: 289 Bytes

Versions: 66

Compression:

Stored size: 289 Bytes

Contents

class AddSuperuserToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :superuser, :boolean, :default => false
    unless (user = User.first).nil?
      user.update_attribute(:superuser, true)
    end
  end

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

Version data entries

66 entries across 66 versions & 2 rubygems

Version Path
refinerycms-0.9.7.15 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.14 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8.5 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8.4 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8.3 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8.2 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8.1 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.8 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.13 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.11 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.10 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.9 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.8 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.7 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.6 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.5 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.4 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.3 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.2 db/migrate/20091207033335_add_superuser_to_users.rb
refinerycms-0.9.7.1 db/migrate/20091207033335_add_superuser_to_users.rb