diff options
| author | Alex Gleason <alex@alexgleason.me> | 2021-06-01 11:32:30 -0500 |
|---|---|---|
| committer | Alex Gleason <alex@alexgleason.me> | 2021-06-01 11:33:11 -0500 |
| commit | c435de426d045118ed7be3d77f659f349d2d2245 (patch) | |
| tree | a4cafffc0aa601c994dfd4c3a480dfd9dd5bfa3b /priv/repo/migrations/20210401143153_user_notification_settings_fix.exs | |
| parent | 10dfe814795f16d6c32f5b6a7421e3e7c597f1ad (diff) | |
| parent | 75b94a2f352ea255b0785d0f3ba2c849c8355e04 (diff) | |
| download | pleroma-c435de426d045118ed7be3d77f659f349d2d2245.tar.gz pleroma-c435de426d045118ed7be3d77f659f349d2d2245.zip | |
Merge remote-tracking branch 'pleroma/develop' into cycles-constants
Diffstat (limited to 'priv/repo/migrations/20210401143153_user_notification_settings_fix.exs')
| -rw-r--r-- | priv/repo/migrations/20210401143153_user_notification_settings_fix.exs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs b/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs new file mode 100644 index 000000000..cf68f1be6 --- /dev/null +++ b/priv/repo/migrations/20210401143153_user_notification_settings_fix.exs @@ -0,0 +1,17 @@ +defmodule Pleroma.Repo.Migrations.UserNotificationSettingsFix do + use Ecto.Migration + + def up do + execute(~s(UPDATE users + SET + notification_settings = '{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb WHERE notification_settings IS NULL +)) + + execute("ALTER TABLE users + ALTER COLUMN notification_settings SET NOT NULL") + end + + def down do + :ok + end +end |
