Sha256: cbf9a8fbc69ef4e5fa454512446aeab4be19247647a4efae0b017fc380b6bd15

Contents?: true

Size: 499 Bytes

Versions: 4

Compression:

Stored size: 499 Bytes

Contents

class UsersMigration < Migration
  def self.up(site)
    site.users.modify do |users|
      remove_field :email
      add_field :email, :alias, of: :username
      
      remove_field :first_name
      remove_field :last_name
      remove_field :name
      add_field :name, :string
      
      add_field :title, :alias, of: :name
      users.add_mixin site.pages
      
      add_many  :sites
      
      users.record_class_name = 'ProductionUser'
    end
  end
  
  def self.down(site)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yodel_production_environment-0.0.7 lib/migrations/site/01_users_model.rb
yodel_production_environment-0.0.4 lib/migrations/site/01_users_model.rb
yodel_production_environment-0.0.2 lib/migrations/site/01_users_model.rb
yodel_production_environment-0.0.1 lib/migrations/site/01_users_model.rb