diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-11 09:15:55 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-11 09:15:55 +0300 |
| commit | 972889550da0f623693eeb3b2d1ca3025501e5eb (patch) | |
| tree | 175d795fcd44230b20913d162d96516bbab81989 /priv/repo | |
| parent | 5fc92deef37dcc4db476520d89dd79e616356e63 (diff) | |
| parent | 953aece84866a89bd3de8f6d3f5d30e2f9cfb4f3 (diff) | |
| download | pleroma-972889550da0f623693eeb3b2d1ca3025501e5eb.tar.gz pleroma-972889550da0f623693eeb3b2d1ca3025501e5eb.zip | |
Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions
Diffstat (limited to 'priv/repo')
| -rw-r--r-- | priv/repo/migrations/20200307103755_fix_moderation_log_subjects.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200307103755_fix_moderation_log_subjects.exs b/priv/repo/migrations/20200307103755_fix_moderation_log_subjects.exs new file mode 100644 index 000000000..d1c8539e1 --- /dev/null +++ b/priv/repo/migrations/20200307103755_fix_moderation_log_subjects.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.FixModerationLogSubjects do + use Ecto.Migration + + def change do + execute( + "update moderation_log set data = safe_jsonb_set(data, '{subject}', safe_jsonb_set('[]'::jsonb, '{0}', data->'subject')) where jsonb_typeof(data->'subject') != 'array' and data->>'action' = ANY('{revoke,grant,activate,deactivate,delete}');" + ) + end +end |
