Sha256: a142f5e233dc04dcd4e21bbcfc153895d82f4df8f68b3b2550bfe53073f12ce4

Contents?: true

Size: 589 Bytes

Versions: 11

Compression:

Stored size: 589 Bytes

Contents

class DeviseCreate<%= table_name.camelize %> < ActiveRecord::Migration
  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

11 entries across 11 versions & 2 rubygems

Version Path
devise-3.5.10 lib/generators/active_record/templates/migration.rb
devise-3.5.9 lib/generators/active_record/templates/migration.rb
devise-3.5.8 lib/generators/active_record/templates/migration.rb
devise-3.5.7 lib/generators/active_record/templates/migration.rb
devise-3.5.6 lib/generators/active_record/templates/migration.rb
devise-3.5.5 lib/generators/active_record/templates/migration.rb
devise-3.5.4 lib/generators/active_record/templates/migration.rb
devise-3.5.3 lib/generators/active_record/templates/migration.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/devise-3.5.2/lib/generators/active_record/templates/migration.rb
devise-3.5.2 lib/generators/active_record/templates/migration.rb
devise-3.5.1 lib/generators/active_record/templates/migration.rb