-
-
Save shankardevy/0b8e242dca7a78e7f7ebccf3afbbd135 to your computer and use it in GitHub Desktop.
Migration file for create customers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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