Sha256: 1da1a9461c3ce436da386c3d1a7cbea4b599274d86a75124745913e3a4fab247

Contents?: true

Size: 447 Bytes

Versions: 16

Compression:

Stored size: 447 Bytes

Contents

class AddNyauthTo<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    change_table(:<%= table_name %>) do |t|
<%= migration_data -%>
    end

    add_index :<%= table_name %>, :email, unique: true
    add_index :<%= table_name %>, :reset_password_key, unique: true
    # Confirmable
    #add_index :<%= table_name %>, :confirmation_key, unique: true
  end

  def self.down
    raise ActiveRecord::IrreversibleMigration
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
nyauth-0.7.2 lib/generators/nyauth/templates/migration.rb
nyauth-0.7.1 lib/generators/nyauth/templates/migration.rb
nyauth-0.7.0 lib/generators/nyauth/templates/migration.rb
nyauth-0.6.2 lib/generators/nyauth/templates/migration.rb
nyauth-0.6.1 lib/generators/nyauth/templates/migration.rb
nyauth-0.6.0 lib/generators/nyauth/templates/migration.rb
nyauth-0.5.0 lib/generators/nyauth/templates/migration.rb
nyauth-0.4.0 lib/generators/nyauth/templates/migration.rb
nyauth-0.3.0 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.8 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.7 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.6 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.5 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.4 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.3 lib/generators/nyauth/templates/migration.rb
nyauth-0.2.2 lib/generators/nyauth/templates/migration.rb