1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.SetDefaultStateToReports do
10 UPDATE activities AS a
11 SET data = jsonb_set(data, '{state}', '"open"', true)
12 WHERE data->>'type' = 'Flag'
18 UPDATE activities AS a
19 SET data = data #- '{state}'
20 WHERE data->>'type' = 'Flag'