Sha256: 1f1de4cfa865de547c17557cb536baf4523a028804cece9ffc5d5764825f7ce4

Contents?: true

Size: 850 Bytes

Versions: 7

Compression:

Stored size: 850 Bytes

Contents

# This migration comes from citygate (originally 20120303195145)
class DeviseInvitableAddToUsers < ActiveRecord::Migration
  def up
    change_table :citygate_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 :citygate_users, :encrypted_password, true
  end

  def down
    change_table :citygate_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

7 entries across 7 versions & 2 rubygems

Version Path
boss-cms-0.0.2 spec/dummy/db/migrate/20120712230938_devise_invitable_add_to_users.citygate.rb
citygate-0.1.1 spec/dummy/db/migrate/20121010234719_devise_invitable_add_to_users.citygate.rb
citygate-0.1.0 spec/dummy/db/migrate/20121010234719_devise_invitable_add_to_users.citygate.rb
citygate-0.0.9 spec/dummy/db/migrate/20120706095549_devise_invitable_add_to_users.citygate.rb
citygate-0.0.8 spec/dummy/db/migrate/20120706095549_devise_invitable_add_to_users.citygate.rb
citygate-0.0.7 spec/dummy/db/migrate/20120706095549_devise_invitable_add_to_users.citygate.rb
citygate-0.0.6 spec/dummy/db/migrate/20120706095549_devise_invitable_add_to_users.citygate.rb