1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.OnlyExpireCreates do
11 activity_expirations a_exp USING activities a, objects o
13 a_exp.activity_id = a.id AND (o.data->>'id') = COALESCE(a.data->'object'->>'id', a.data->>'object')
14 AND (a.data->>'type' != 'Create' OR o.data->>'type' != 'Note');