Current section

Files

Jump to
guard lib doorman repo migrations 20180516143801_modify_user_pin.ex
Raw

lib/doorman/repo/migrations/20180516143801_modify_user_pin.ex

defmodule Doorman.Repo.Migrations.ModifyUserPin do
use Ecto.Migration
def users_table() do
Application.get_env(:doorman, :users_table, :users)
end
def change do
rename table(users_table()), :pin, to: :enc_pin
rename table(users_table()), :pin_timestamp, to: :pin_expiration
create unique_index(users_table(), [:mobile])
end
end