1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/priv/repo/migrations/20180303153745_change_username_to_email.exs

10 lines
233 B
Elixir

defmodule Chess.Repo.Migrations.ChangeUsernameToEmail do
use Ecto.Migration
def change do
drop index(:users, [:username])
rename(table("users"), :username, to: :email)
create unique_index(:users, [:email])
end
end