- Implemented user notification preferences table for managing default notification settings. - Created sag_reminders table to define reminder rules with various trigger types and recipient configurations. - Developed sag_reminder_queue for processing reminder events triggered by status changes or scheduled times. - Added sag_reminder_logs to track reminder notifications and user interactions. - Introduced frontend notification system using Bootstrap 5 Toast for displaying reminders. - Created email template for sending reminders with case details and action links. - Implemented rate limiting for user notifications to prevent spamming. - Added triggers and functions for automatic updates and reminder processing.
13 lines
425 B
SQL
13 lines
425 B
SQL
-- Migration 095: Add deferred until case/status to sag_sager
|
|
-- Dato: 3. februar 2026
|
|
|
|
ALTER TABLE sag_sager
|
|
ADD COLUMN IF NOT EXISTS deferred_until_case_id INTEGER REFERENCES sag_sager(id) ON DELETE SET NULL;
|
|
|
|
ALTER TABLE sag_sager
|
|
ADD COLUMN IF NOT EXISTS deferred_until_status VARCHAR;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_sag_sager_deferred_case
|
|
ON sag_sager(deferred_until_case_id)
|
|
WHERE deleted_at IS NULL;
|