simplify task api
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
This commit is contained in:
@@ -3,23 +3,20 @@ defmodule WorkloadService.Repo.Migrations.CreateTasks do
|
||||
|
||||
def change do
|
||||
create table(:tasks, primary_key: false) do
|
||||
add :id, :string, primary_key: true
|
||||
add :org_id, :string, null: false
|
||||
add :application_id, :string, null: false
|
||||
add :provider_id, :string, null: false
|
||||
add :provider_name, :string
|
||||
add :task_info, :map, default: %{}
|
||||
add :submission, :map
|
||||
add :attachments, {:array, :string}, default: []
|
||||
add :status, :string, null: false, default: "created"
|
||||
add :version, :integer, default: 1
|
||||
add(:id, :string, primary_key: true)
|
||||
add(:org_id, :string, null: false)
|
||||
add(:application_id, :string, null: false)
|
||||
add(:task_info, :map, default: %{})
|
||||
add(:submission, :map)
|
||||
add(:attachments, {:array, :string}, default: [])
|
||||
add(:status, :string, null: false, default: "created")
|
||||
add(:version, :integer, default: 1)
|
||||
|
||||
timestamps type: :utc_datetime
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:tasks, [:application_id])
|
||||
create index(:tasks, [:org_id])
|
||||
create index(:tasks, [:provider_id])
|
||||
create index(:tasks, [:status])
|
||||
create(index(:tasks, [:application_id]))
|
||||
create(index(:tasks, [:org_id]))
|
||||
create(index(:tasks, [:status]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user