Compare commits
3 Commits
feature/sa
...
2307-objec
Author | SHA1 | Date | |
---|---|---|---|
|
b233ed2e09 | ||
|
002c5b97be | ||
|
6b9fa21dc8 |
@ -0,0 +1,22 @@
|
||||
defmodule Pleroma.Repo.Migrations.ChangeObjectIndexOnCreateActivities do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
@disable_migration_lock true
|
||||
|
||||
def change do
|
||||
drop_if_exists(
|
||||
index(:activities, ["(coalesce(data->'object'->>'id', data->>'object'))"],
|
||||
name: :activities_create_objects_index
|
||||
)
|
||||
)
|
||||
|
||||
create(
|
||||
index(:activities, ["(coalesce(data->'object'->>'id', data->>'object'))"],
|
||||
name: :activities_create_objects_index,
|
||||
concurrently: true,
|
||||
where: "data->>'type' = 'Create'"
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user