Sha256: c32d51a8976a09c6a4a3e29ff0a582098e38eb799ec0d6c15047a7892a632e6e

Contents?: true

Size: 612 Bytes

Versions: 12

Compression:

Stored size: 612 Bytes

Contents

class DeviseCreate<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :<%= table_name %> do |t|
<%= migration_data -%>

<% attributes.each do |attribute| -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>

      t.timestamps null: false
    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
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
devise-4.3.0 lib/generators/active_record/templates/migration.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/lib/generators/active_record/templates/migration.rb
devise-4.2.1 lib/generators/active_record/templates/migration.rb
devise-4.2.0 lib/generators/active_record/templates/migration.rb
devise-4.0.3 lib/generators/active_record/templates/migration.rb
devise-4.1.1 lib/generators/active_record/templates/migration.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/lib/generators/active_record/templates/migration.rb
devise-4.1.0 lib/generators/active_record/templates/migration.rb
devise-4.0.2 lib/generators/active_record/templates/migration.rb
devise-4.0.1 lib/generators/active_record/templates/migration.rb
devise-4.0.0 lib/generators/active_record/templates/migration.rb
devise-4.0.0.rc2 lib/generators/active_record/templates/migration.rb