All checks were successful
Build and Publish / build-release (push) Successful in 2m55s
29 lines
923 B
Elixir
29 lines
923 B
Elixir
defmodule CustomerService.Repo.Migrations.AddQuickLeadsTable do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:quick_leads, primary_key: false) do
|
|
add :id, :uuid, primary_key: true
|
|
add :name, :string
|
|
add :email, :string
|
|
add :phone, :string
|
|
add :company_name, :string
|
|
add :status, :string, null: false, default: "new"
|
|
add :priority, :string, null: false, default: "medium"
|
|
add :source, :string, null: false, default: "other"
|
|
add :notes, :string
|
|
add :assigned_to, :string
|
|
add :estimated_value, :decimal
|
|
add :expected_close_date, :date
|
|
add :status_history, {:array, :map}, default: []
|
|
timestamps()
|
|
end
|
|
|
|
create index(:quick_leads, [:status])
|
|
create index(:quick_leads, [:priority])
|
|
create index(:quick_leads, [:source])
|
|
create index(:quick_leads, [:assigned_to])
|
|
create index(:quick_leads, [:email])
|
|
end
|
|
end
|