mobilizon/priv/repo/migrations/20171207180737_add_coherence_to_user.exs
Thomas Citharel 90ceb4f6fe initial commit
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-12-08 09:58:14 +01:00

33 lines
968 B
Elixir

defmodule Eventos.Repo.Migrations.AddCoherenceToUser do
use Ecto.Migration
def change do
alter table(:users) do
# confirmable
add :confirmation_token, :string
add :confirmed_at, :utc_datetime
add :confirmation_sent_at, :utc_datetime
# rememberable
add :remember_created_at, :utc_datetime
# authenticatable
add :password_hash, :string
add :active, :boolean, null: false, default: true
# recoverable
add :reset_password_token, :string
add :reset_password_sent_at, :utc_datetime
# lockable
add :failed_attempts, :integer, default: 0
add :locked_at, :utc_datetime
# trackable
add :sign_in_count, :integer, default: 0
add :current_sign_in_at, :utc_datetime
add :last_sign_in_at, :utc_datetime
add :current_sign_in_ip, :string
add :last_sign_in_ip, :string
# unlockable_with_token
add :unlock_token, :string
end
end
end