Start with subscriptions on for everyone

To prevent people missing a notification they care about when we ship
the subscriptions feature, we'll start out with everything toggled on
(which matches the previous behaviour). People can then opt out as they
like.
This commit is contained in:
Kevin McConnell
2025-02-27 10:39:44 +00:00
parent cf5ddbbb78
commit 2b8d41a752
@@ -8,5 +8,11 @@ class CreateSubscriptions < ActiveRecord::Migration[8.1]
t.index [ :subscribable_type, :subscribable_id, :user_id ], unique: true
end
# Subscribe everyone to their current buckets to start with
execute "
insert into subscriptions (subscribable_type, subscribable_id, user_id, created_at, updated_at)
select 'Bucket', bucket_id, user_id, current_timestamp, current_timestamp from accesses;
"
end
end