Sha256: 040b1fd67a68eeecf55de54d42e962a2a57e783e6847a3ee7813aaf8194428c9

Contents?: true

Size: 684 Bytes

Versions: 1

Compression:

Stored size: 684 Bytes

Contents

class ClearanceCreateUsers < ActiveRecord::Migration
  def self.up
    create_table(:users) do |t|
      t.string   :email
      t.string   :encrypted_password, :limit => 128
      t.string   :salt,               :limit => 128
      t.string   :token,              :limit => 128
      t.datetime :token_expires_at
      t.boolean  :email_confirmed, :default => false, :null => false
      t.boolean  :admin, :default => false, :null => false
      t.integer :invitation_id
      t.integer :invitation_limit
      t.timestamps
    end

    add_index :users, [:id, :token]
    add_index :users, :email
    add_index :users, :token
  end

  def self.down
    drop_table :users
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tonkapark-clearance-0.6.9.3 generators/clearance/templates/migrations/create_users.rb