Add index on content size

This commit is contained in:
Claudio Ortolina
2025-09-20 09:59:27 +03:00
parent 056aef97cc
commit 2e071d24b9
@@ -0,0 +1,15 @@
defmodule MusicLibrary.Repo.Migrations.AddAssetsContentSizeIndex do
use Ecto.Migration
def up do
execute """
CREATE index assets_content_size_index on assets(length(content));
"""
end
def down do
execute """
DROP index assets_content_size_index;
"""
end
end