Complete defaults

This commit is contained in:
Roman Chvanikov 2019-10-28 19:16:19 +03:00
parent 0be9cb086b
commit 4b0893631f
1 changed files with 19 additions and 0 deletions

View File

@ -27,6 +27,25 @@ def up do
execute("UPDATE push_subscriptions SET data = '{}'::jsonb WHERE data IS NULL") execute("UPDATE push_subscriptions SET data = '{}'::jsonb WHERE data IS NULL")
execute("UPDATE users SET source_data = '{}'::jsonb where source_data IS NULL")
execute("UPDATE users SET note_count = 0 where note_count IS NULL")
execute("UPDATE users SET background = '{}'::jsonb where background IS NULL")
execute("UPDATE users SET follower_count = 0 where follower_count IS NULL")
execute(
"UPDATE users SET unread_conversation_count = 0 where unread_conversation_count IS NULL"
)
execute(
~s(UPDATE users SET email_notifications = '{"digest": false}'::jsonb where email_notifications IS NULL)
)
execute("UPDATE users SET default_scope = 'public' where default_scope IS NULL")
execute(
"UPDATE users SET pleroma_settings_store = '{}'::jsonb where pleroma_settings_store IS NULL"
)
execute("UPDATE users SET following = ARRAY[]::character varying[] WHERE following IS NULL") execute("UPDATE users SET following = ARRAY[]::character varying[] WHERE following IS NULL")
execute("UPDATE users SET tags = ARRAY[]::character varying[] WHERE tags IS NULL") execute("UPDATE users SET tags = ARRAY[]::character varying[] WHERE tags IS NULL")
execute(~s(UPDATE users SET notification_settings = execute(~s(UPDATE users SET notification_settings =