June 25 - Implement reminder

This commit is contained in:
2026-06-25 16:52:19 -04:00
parent ea3648ad90
commit 2a75d17301
7 changed files with 263 additions and 1 deletions
+11
View File
@@ -329,6 +329,17 @@ def initialize_database():
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
""",
"""
CREATE TABLE IF NOT EXISTS shift_reminder_log (
user_id INT NOT NULL,
shift_id INT NOT NULL,
sent_date DATE NOT NULL,
sent_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (user_id, shift_id, sent_date),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY (shift_id) REFERENCES shifts(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
""",
]
conn = None