projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
migration to remove old cron jobs
[akkoma]
/
priv
/
repo
/
migrations
/
20190511191044_set_default_state_to_reports.exs
diff --git
a/priv/repo/migrations/20190511191044_set_default_state_to_reports.exs
b/priv/repo/migrations/20190511191044_set_default_state_to_reports.exs
index 0d3d253b6f2c8bc32f2a356593d0a2176abf2864..ab1351d5655e7bf7ac23127cc9865473e34af251 100644
(file)
--- a/
priv/repo/migrations/20190511191044_set_default_state_to_reports.exs
+++ b/
priv/repo/migrations/20190511191044_set_default_state_to_reports.exs
@@
-2,18
+2,18
@@
defmodule Pleroma.Repo.Migrations.SetDefaultStateToReports do
use Ecto.Migration
def up do
use Ecto.Migration
def up do
- execute
"""
+ execute
(
"""
UPDATE activities AS a
SET data = jsonb_set(data, '{state}', '"open"', true)
WHERE data->>'type' = 'Flag'
UPDATE activities AS a
SET data = jsonb_set(data, '{state}', '"open"', true)
WHERE data->>'type' = 'Flag'
- """
+ """
)
end
def down do
end
def down do
- execute
"""
+ execute
(
"""
UPDATE activities AS a
SET data = data #- '{state}'
WHERE data->>'type' = 'Flag'
UPDATE activities AS a
SET data = data #- '{state}'
WHERE data->>'type' = 'Flag'
- """
+ """
)
end
end
end
end