init commit

This commit is contained in:
2026-04-16 14:20:58 -05:00
commit cc973cc11c
51 changed files with 2447 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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 :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
timestamps type: :utc_datetime
end
create index(:tasks, [:application_id])
create index(:tasks, [:org_id])
create index(:tasks, [:provider_id])
create index(:tasks, [:status])
end
end

View File

@@ -0,0 +1,12 @@
defmodule WorkloadService.Repo.Migrations.CreateProjectionVersions do
use Ecto.Migration
def change do
create table(:projection_versions, primary_key: false) do
add(:projection_name, :text, primary_key: true)
add(:last_seen_event_number, :bigint)
timestamps(type: :naive_datetime_usec)
end
end
end