mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-09-08 20:58:28 +00:00
19 lines
400 B
Elixir
19 lines
400 B
Elixir
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
|