This commit is contained in:
23
priv/repo/migrations/20260312182715_create_providers.exs
Normal file
23
priv/repo/migrations/20260312182715_create_providers.exs
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user