π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Backfill missing usage rows
Neeraj Guptac2011b314561
diff --git a/server/migrations/141_backfill_missing_usage.down.sql b/server/migrations/141_backfill_missing_usage.down.sqlnew file mode 100644index 0000000000..9f7060a47f--- /dev/null+++ b/server/migrations/141_backfill_missing_usage.down.sql@@ -0,0 +1 @@+-- no-opdiff --git a/server/migrations/141_backfill_missing_usage.up.sql b/server/migrations/141_backfill_missing_usage.up.sqlnew file mode 100644index 0000000000..2b1e4be15c--- /dev/null+++ b/server/migrations/141_backfill_missing_usage.up.sql@@ -0,0 +1,9 @@+INSERT INTO usage(user_id, storage_consumed)+SELECT u.user_id, 0+FROM users u+WHERE NOT EXISTS (+ SELECT 1+ FROM usage us+ WHERE us.user_id = u.user_id+)+ON CONFLICT (user_id) DO NOTHING;