Sha256: 56bce545d5c395179c02083327bb8f8f980f8808e2893c71cb970a2b68083ad7

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

class DeviseCreate<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table(:<%= table_name %>) do |t|
      t.authenticatable :encryptor => :sha1, :null => false
      t.confirmable
      t.recoverable
      t.rememberable
      t.trackable

      t.timestamps
    end

    add_index :<%= table_name %>, :email,                :unique => true
    add_index :<%= table_name %>, :confirmation_token,   :unique => true
    add_index :<%= table_name %>, :reset_password_token, :unique => true
  end

  def self.down
    drop_table :<%= table_name %>
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devise-0.8.2 generators/devise/templates/migration.rb
devise-0.8.1 generators/devise/templates/migration.rb
devise-0.8.0 generators/devise/templates/migration.rb
devise-0.7.5 generators/devise/templates/migration.rb
devise-0.7.4 generators/devise/templates/migration.rb
devise-0.7.3 generators/devise/templates/migration.rb
devise-0.7.2 generators/devise/templates/migration.rb