WIP
This commit is contained in:
19
priv/repo/migrations/20260224165602_add_customer_table.exs
Normal file
19
priv/repo/migrations/20260224165602_add_customer_table.exs
Normal file
@@ -0,0 +1,19 @@
|
||||
defmodule CustomerService.Repo.Migrations.AddCustomerTable do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:customers, primary_key: false) do
|
||||
add :id, :uuid, primary_key: true
|
||||
add :first_name, :string
|
||||
add :last_name, :string
|
||||
add :birth_date, :date
|
||||
add :gender, :string
|
||||
add :email, :string
|
||||
add :phone, :string
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create index(:customers, [:email])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user