Add Reports to Admin API

This commit is contained in:
Sergey Suprunenko 2019-05-16 19:09:18 +00:00 committed by feld
commit e2b3a27204
16 changed files with 945 additions and 20 deletions

View file

@ -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