birthday mail for each account

This commit is contained in:
2026-08-07 21:31:53 +02:00
parent b9c6c99120
commit 5e1a2b0b92
11 changed files with 131 additions and 80 deletions
+3 -2
View File
@@ -81,11 +81,12 @@ CREATE TABLE IF NOT EXISTS group_members (
KEY idx_group_members_member_uid (member_uid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Protokoll der Geburtstags-Mails, verhindert Doppelversand am selben Tag.
-- Protokoll der Geburtstags-Mails, verhindert Doppelversand am selben Tag pro Account.
CREATE TABLE IF NOT EXISTS birthday_mail_log (
id INT AUTO_INCREMENT PRIMARY KEY,
account VARCHAR(100) NOT NULL,
sent_date DATE NOT NULL,
contacts_count INT NOT NULL,
sent_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY uq_birthday_mail_date (sent_date)
UNIQUE KEY uq_birthday_mail_date_account (account, sent_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;