Current section
Files
Jump to
Current section
Files
priv/migrations/0-authenticable_changes.ex
defmodule Haytni.Migrations.AuthenticableCreation do
use Ecto.Migration
def change(table \\ <%= inspect table %>) do
create_if_not_exists table(table) do
# NOP
end
alter table(table) do
add :email, :string, null: false
add :encrypted_password, :string, null: false
end
create index(table, ~W[email]a, unique: true)
end
end