Replace embedded object migration with a mix task
This commit is contained in:
parent
9238dccac1
commit
099f89367e
2 changed files with 45 additions and 10 deletions
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Pleroma.Repo.Migrations.RemoveEmbededObjects do
|
||||
use Ecto.Migration
|
||||
|
||||
# TODO: bench on a real DB and add clippy if it takes too long
|
||||
def change do
|
||||
execute """
|
||||
update activities set data = jsonb_set(data, '{object}'::text[], data->'object'->'id') where data->>'type' = 'Create' and data->'object'->>'id' is not null;
|
||||
"""
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue