mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 12:59:24 +00:00
23 lines
347 B
Elixir
23 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
|