10 lines
506 B
SQL
10 lines
506 B
SQL
-- Aggregated like emails.
|
|
--
|
|
-- like_email_sent_at throttles the per-post like email: once an aggregated
|
|
-- "X and N others liked your post" email goes out, further likes within the
|
|
-- throttle window only update the in-app/push aggregate, not a fresh email.
|
|
ALTER TABLE notifications ADD COLUMN IF NOT EXISTS like_email_sent_at TIMESTAMPTZ;
|
|
|
|
-- Per-user opt-out for like emails (push + in-app are unaffected).
|
|
ALTER TABLE users ADD COLUMN IF NOT EXISTS like_emails_enabled BOOLEAN NOT NULL DEFAULT TRUE;
|