All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
23 lines
683 B
Elixir
23 lines
683 B
Elixir
defmodule WorkloadService.Repo.Migrations.CreateTasks do
|
|
use Ecto.Migration
|
|
|
|
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(: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)
|
|
end
|
|
|
|
create(index(:tasks, [:application_id]))
|
|
create(index(:tasks, [:org_id]))
|
|
create(index(:tasks, [:status]))
|
|
end
|
|
end
|