projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'develop' into stable
[akkoma]
/
priv
/
repo
/
migrations
/
20220805123645_remove_remote_cancelled_follow_requests.exs
1
defmodule Pleroma.Repo.Migrations.RemoveRemoteCancelledFollowRequests do
2
use Ecto.Migration
3
4
def up do
5
statement = """
6
DELETE FROM
7
activities
8
WHERE
9
(data->>'type') = 'Follow'
10
AND
11
(data->>'state') = 'cancelled'
12
AND
13
local = false;
14
"""
15
16
execute(statement)
17
18
statement = """
19
DELETE FROM
20
activities
21
WHERE
22
(data->>'type') = 'Undo'
23
AND
24
(data->'object'->>'type') = 'Follow'
25
AND
26
local = false;
27
"""
28
29
execute(statement)
30
end
31
32
def down do
33
:ok
34
end
35
end