mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 13:14:57 +00:00
8e4de118c1
same deal but backwards this time Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/194
22 lines
347 B
Elixir
22 lines
347 B
Elixir
defmodule Pleroma.Repo.Migrations.RemoveLocalCancelledFollows do
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
statement = """
|
|
DELETE FROM
|
|
activities
|
|
WHERE
|
|
(data->>'type') = 'Follow'
|
|
AND
|
|
(data->>'state') = 'cancelled'
|
|
AND
|
|
local = true;
|
|
"""
|
|
|
|
execute(statement)
|
|
end
|
|
|
|
def down do
|
|
:ok
|
|
end
|
|
end
|