Initial commit on Forgejo
All checks were successful
CI and deploy / Test (push) Successful in 4m52s
CI and deploy / Deploy production (push) Successful in 23s

Fresh repository history for elektrine/tarakan hosted at
https://git.elektrine.com/elektrine/tarakan.
This commit is contained in:
Maxfield Luke 2026-07-29 04:43:40 -04:00
commit af6077b9c3
455 changed files with 78366 additions and 0 deletions

View file

@ -0,0 +1,26 @@
defmodule Tarakan.Repo.Migrations.LinkReviewTasksAndScans do
@moduledoc """
Additive FKs for the Review/Request domain collapse (PR 1a).
- `review_tasks.linked_review_id` the latest Review created when completing a Request
- `scans.source_request_id` the Request that produced this Review (history of attempts)
No application behavior change in this migration. Both columns are nullable so
existing rows and ad-hoc Reviews remain valid.
"""
use Ecto.Migration
def change do
alter table(:scans) do
add :source_request_id, references(:review_tasks, on_delete: :nilify_all)
end
alter table(:review_tasks) do
add :linked_review_id, references(:scans, on_delete: :nilify_all)
end
create index(:scans, [:source_request_id])
create index(:review_tasks, [:linked_review_id])
end
end