Merge branch 'events-index' into 'develop'

Add events index

See merge request soapbox-pub/rebased!223
This commit is contained in:
Alex Gleason 2022-12-08 16:06:30 +00:00
commit 100a744b61

View file

@ -0,0 +1,16 @@
defmodule Pleroma.Repo.Migrations.AddEventsIndex do
use Ecto.Migration
@disable_ddl_transaction true
@disable_migration_lock true
def change do
create_if_not_exists(
index(:objects, ["(data->>'type')"],
where: "data->>'type' = 'Event'",
name: :objects_events,
concurrently: true
)
)
end
end