Sha256: 40112911c1cacc8efd972fa89c876ddf529605abd636b7aa0f83625dd9a980b0

Contents?: true

Size: 758 Bytes

Versions: 31

Compression:

Stored size: 758 Bytes

Contents

class DeviseInvitableAddToUsers < ActiveRecord::Migration
  def up
    change_table :users do |t|
      t.string     :invitation_token, :limit => 60
      t.datetime   :invitation_sent_at
      t.datetime   :invitation_accepted_at
      t.integer    :invitation_limit
      t.references :invited_by, :polymorphic => true
      t.index      :invitation_token # for invitable
      t.index      :invited_by_id
    end

    # And allow null encrypted_password and password_salt:
    change_column_null :users, :encrypted_password, true
  end

  def down
    change_table :users do |t|
      t.remove_references :invited_by, :polymorphic => true
      t.remove :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
houston-core-0.5.6 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.5 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.4 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.3 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.2 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.1 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.0 db/migrate/20120417175841_devise_invitable_add_to_users.rb
houston-core-0.5.0.beta1 db/migrate/20120417175841_devise_invitable_add_to_users.rb
citygate-0.0.3 db/migrate/20120303195145_devise_invitable_add_to_users.rb
citygate-0.0.2 db/migrate/20120303195145_devise_invitable_add_to_users.rb
citygate-0.0.1 db/migrate/20120303195145_devise_invitable_add_to_users.rb