wip activities_published index

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-08-09 23:38:49 +02:00
parent 82af8b1e92
commit 7da517d23a

View file

@ -0,0 +1,12 @@
defmodule Pleroma.Repo.Migrations.AddPublishedIndexToActivities do
use Ecto.Migration
def change do
create_if_not_exists(
index(:activities, ["case when data->>'type' = 'Create' then (data->'object'->>'published')::timestamptz else inserted_at end"],
name: :activities_published,
concurrently: true
)
)
end
end