Sha256: 44a8a4ecd0f4e2a5969de195540184bc335191a4c322837d104922ba84666bf9

Contents?: true

Size: 998 Bytes

Versions: 19

Compression:

Stored size: 998 Bytes

Contents

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

      # t.encryptable
      # t.confirmable
      # t.lockable :lock_strategy => :<%= Devise.lock_strategy %>, :unlock_strategy => :<%= Devise.unlock_strategy %>
      # t.token_authenticatable

<% for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>

      t.timestamps
    end

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

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

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/devise-1.2.1/lib/generators/active_record/templates/migration.rb
devise-1.4.9 lib/generators/active_record/templates/migration.rb
devise-1.4.8 lib/generators/active_record/templates/migration.rb
devise-1.4.7 lib/generators/active_record/templates/migration.rb
devise-1.4.5 lib/generators/active_record/templates/migration.rb
devise-1.4.3 lib/generators/active_record/templates/migration.rb
devise-1.4.2 lib/generators/active_record/templates/migration.rb
devise-1.4.1 lib/generators/active_record/templates/migration.rb
devise-1.3.4 lib/generators/active_record/templates/migration.rb
devise-1.3.3 lib/generators/active_record/templates/migration.rb
devise-1.3.2 lib/generators/active_record/templates/migration.rb
devise-1.3.1 lib/generators/active_record/templates/migration.rb
devise-1.3.0 lib/generators/active_record/templates/migration.rb
devise-1.2.1 lib/generators/active_record/templates/migration.rb
devise-1.2.0 lib/generators/active_record/templates/migration.rb
devise-jdguyot-1.2.rc3 lib/generators/active_record/templates/migration.rb
devise-1.2.rc2 lib/generators/active_record/templates/migration.rb
devise-jdguyot-1.2.rc2 lib/generators/active_record/templates/migration.rb
devise-jdguyot-1.2.rc lib/generators/active_record/templates/migration.rb