Files
provider-service/priv/repo/migrations/20260312182715_create_providers.exs
HaimKortovich f566d04a04
All checks were successful
Build and Publish / build-release (push) Successful in 4m46s
init commit
2026-04-15 15:31:56 -05:00

24 lines
676 B
Elixir

defmodule ProviderService.Repo.Migrations.CreateProviders do
use Ecto.Migration
def change do
create table(:providers, primary_key: false) do
add(:provider_id, :string, primary_key: true)
add(:name, :string, null: false)
add(:email, :string)
add(:phone, :string)
add(:contact_name, :string)
add(:ruc, :string)
add(:address, :string)
add(:active, :boolean, default: true, null: false)
add(:templates, :map, default: %{})
add(:default_templates, :map, default: %{})
timestamps(type: :utc_datetime_usec)
end
create(index(:providers, [:active]))
create(index(:providers, [:name]))
end
end