All checks were successful
Build and Publish / build-release (push) Successful in 3m7s
30 lines
863 B
Elixir
30 lines
863 B
Elixir
defmodule CustomerService.Repo.Migrations.AddCustomerTable do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:customers, primary_key: false) do
|
|
add :id, :string, primary_key: true
|
|
add :org_id, :string, null: false
|
|
add :customer_id, :string, null: false
|
|
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, [:org_id])
|
|
create index(:customers, [:email])
|
|
end
|
|
end
|