aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2019-10-28 19:16:19 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2019-10-28 19:16:19 +0300
commit4b0893631f2d9f157c200f2787fe5154dc0b811e (patch)
treed5af7470c8d947da4dc16ac5bfe375f917f6ab2c
parent0be9cb086b070858b041cd15ee149d1323952aab (diff)
downloadpleroma-4b0893631f2d9f157c200f2787fe5154dc0b811e.tar.gz
Complete defaults
-rw-r--r--priv/repo/migrations/20191027143434_add_defaults_to_all_tables.exs19
1 files changed, 19 insertions, 0 deletions
diff --git a/priv/repo/migrations/20191027143434_add_defaults_to_all_tables.exs b/priv/repo/migrations/20191027143434_add_defaults_to_all_tables.exs
index ab60f1313..0d2794ad3 100644
--- a/priv/repo/migrations/20191027143434_add_defaults_to_all_tables.exs
+++ b/priv/repo/migrations/20191027143434_add_defaults_to_all_tables.exs
@@ -27,6 +27,25 @@ defmodule Pleroma.Repo.Migrations.AddDefaultsToAllTables do
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 tags = ARRAY[]::character varying[] WHERE tags IS NULL")
execute(~s(UPDATE users SET notification_settings =