Some checks failed
Build and Publish / build-release (push) Failing after 1s
27 lines
736 B
Elixir
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
|