Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Migration file for create customers
defmodule Mango.Repo.Migrations.CreateCustomers do
use Ecto.Migration
def change do
create table(:customers) do
add :name, :string
add :email, :string
add :phone, :string
add :residence_area, :string
add :password_hash, :string
timestamps()
end
create unique_index(:customers, [:email])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment