Files
customer-service/priv/repo/migrations/20260430210538_add_quick_leads_table.exs
HaimKortovich cfd810beba
All checks were successful
Build and Publish / build-release (push) Successful in 2m13s
add quick leads
2026-04-30 16:40:40 -05:00

29 lines
900 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, :map
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