refactor(media): use UUID instead of ID for media retrieval in GraphQL

Fixes #1760
This commit is contained in:
Massedil
2025-05-21 23:05:09 +02:00
committed by setop
parent 1b2c55508e
commit a50681c9ac
27 changed files with 171 additions and 103 deletions

View File

@@ -0,0 +1,12 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddUuidToMedia do
use Ecto.Migration
def change do
# Create the new uuid for medias
alter table(:medias) do
add :uuid, :uuid, default: fragment("gen_random_uuid()"), null: false
end
create(unique_index(:medias, [:uuid]))
end
end