projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'stable' into release/2.0.0
[akkoma]
/
priv
/
repo
/
migrations
/
20190511191044_set_default_state_to_reports.exs
1
defmodule Pleroma.Repo.Migrations.SetDefaultStateToReports do
2
use Ecto.Migration
3
4
def up do
5
execute("""
6
UPDATE activities AS a
7
SET data = jsonb_set(data, '{state}', '"open"', true)
8
WHERE data->>'type' = 'Flag'
9
""")
10
end
11
12
def down do
13
execute("""
14
UPDATE activities AS a
15
SET data = data #- '{state}'
16
WHERE data->>'type' = 'Flag'
17
""")
18
end
19
end