Files
customer-service/priv/repo/migrations/20260224165602_add_customer_table.exs
HaimKortovich b1b1c21e4e
Some checks failed
Build and Publish / build-release (push) Failing after 1s
init commit
2026-04-15 16:20:22 -05:00

27 lines
736 B
Elixir

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
add :document_id, :string
add :customer_type, :string, null: false, default: "individual"
add :legal_name, :string
add :commercial_name, :string
add :ruc, :string
add :legal_rep_name, :string
add :legal_rep_document_id, :string
add :address, :string
timestamps()
end
create index(:customers, [:email])
end
end