mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
leave expirations with Create and Note types
This commit is contained in:
parent
724ed354f2
commit
57b455de5a
1 changed files with 3 additions and 3 deletions
|
@ -4,10 +4,10 @@ defmodule Pleroma.Repo.Migrations.OnlyExpireCreates do
|
||||||
def up do
|
def up do
|
||||||
statement = """
|
statement = """
|
||||||
DELETE FROM
|
DELETE FROM
|
||||||
activity_expirations A USING activities B
|
activity_expirations a_exp USING activities a, objects o
|
||||||
WHERE
|
WHERE
|
||||||
A.activity_id = B.id
|
a_exp.activity_id = a.id AND (o.data->>'id') = COALESCE(a.data->'object'->>'id', a.data->>'object')
|
||||||
AND B.data->>'type' != 'Create';
|
AND (a.data->>'type' != 'Create' OR o.data->>'type' != 'Note');
|
||||||
"""
|
"""
|
||||||
|
|
||||||
execute(statement)
|
execute(statement)
|
||||||
|
|
Loading…
Reference in a new issue