All checks were successful
Build and Publish / build-release (push) Successful in 4m46s
24 lines
676 B
Elixir
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
|