Current section

Files

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

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

defmodule Guard.Repo.Migrations.ModifyUserPin do
use Ecto.Migration
def users_table() do
Application.get_env(:guard, :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