Module Devise::Schema
In: lib/devise/schema.rb

Holds devise schema information. To use it, just include its methods and overwrite the apply_schema method.

Methods

Public Instance methods

Overwrite with specific modification to create your own schema.

Creates confirmation_token, confirmed_at and confirmation_sent_at.

Creates encrypted_password, and email when it is used as an authentication key (default).

Options

  • :null - When true, allow columns to be null.
  • :default - Set to "" when :null is false, unless overridden.

Notes

For Datamapper compatibility, we explicitly hardcode the limit for the encrypter password field in 128 characters.

Creates password salt for encryption support when using encryptors other than the database_authenticable default of bcrypt.

Creates failed_attempts, unlock_token and locked_at depending on the options given.

Options

  • :unlock_strategy - The strategy used for unlock. Can be :time, :email, :both (default), :none. If :email or :both, creates a unlock_token field.
  • :lock_strategy - The strategy used for locking. Can be :failed_attempts (default) or :none.

Creates reset_password_token and reset_password_sent_at.

Options

  • :reset_within - When true, adds a column that reset passwords within some date

Creates remember_token and remember_created_at.

Options

  • :use_salt - When true, does not create a remember_token and use password_salt instead.

Creates authentication_token.

Creates sign_in_count, current_sign_in_at, last_sign_in_at, current_sign_in_ip, last_sign_in_ip.

[Validate]