ALTER TABLE notifications
    DROP CONSTRAINT IF EXISTS notifications_type_check;

ALTER TABLE notifications
    ADD CONSTRAINT notifications_type_check CHECK (
        type IN (
            'course_enrolled',
            'lesson_completed',
            'assessment_assigned',
            'assessment_submitted',
            'assessment_graded',
            'course_completed',
            'certificate_issued',
            'announcement',
            'otp_sent',
            'signup_welcome',
            'system_alert'
        )
    );
