Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20 rindas
445B

  1. defmodule Pleroma.Repo.Migrations.OnlyExpireCreates do
  2. use Ecto.Migration
  3. def up do
  4. statement = """
  5. DELETE FROM
  6. activity_expirations a_exp USING activities a, objects o
  7. WHERE
  8. a_exp.activity_id = a.id AND (o.data->>'id') = COALESCE(a.data->'object'->>'id', a.data->>'object')
  9. AND (a.data->>'type' != 'Create' OR o.data->>'type' != 'Note');
  10. """
  11. execute(statement)
  12. end
  13. def down do
  14. :ok
  15. end
  16. end