Add Reports to Admin API
This commit is contained in:
parent
e190b3022b
commit
e2b3a27204
16 changed files with 945 additions and 20 deletions
|
|
@ -0,0 +1,19 @@
|
|||
defmodule Pleroma.Repo.Migrations.SetDefaultStateToReports do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute """
|
||||
UPDATE activities AS a
|
||||
SET data = jsonb_set(data, '{state}', '"open"', true)
|
||||
WHERE data->>'type' = 'Flag'
|
||||
"""
|
||||
end
|
||||
|
||||
def down do
|
||||
execute """
|
||||
UPDATE activities AS a
|
||||
SET data = data #- '{state}'
|
||||
WHERE data->>'type' = 'Flag'
|
||||
"""
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue