wip activities_published index
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
82af8b1e92
commit
7da517d23a
1 changed files with 12 additions and 0 deletions
|
@ -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
|
Loading…
Reference in a new issue