[2026-01-29 10:38:27] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'first_name' in 'field list' | SQL: INSERT INTO user_profiles (user_id, first_name, last_name) VALUES (?, ?, ?) | Params: ["1","Kwaku","Ntiamoah"]
[2026-01-30 17:26:04] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'time_spent' in 'field list' | SQL: 
        SELECT COUNT(*) as total,
               SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as completed,
               AVG(progress_percentage) as avg_progress,
               SUM(time_spent) as total_time
        FROM course_enrollments 
        WHERE student_id = ?
     | Params: [3]
[2026-02-02 17:19:19] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_amount' in 'field list' | SQL: 
        SELECT COALESCE(SUM(payment_amount), 0) as total,
               COALESCE(SUM(CASE WHEN paid_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN payment_amount ELSE 0 END), 0) as monthly
        FROM payments
        WHERE payment_status = 'completed'
     | Params: []
[2026-02-02 18:32:11] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_amount' in 'field list' | SQL: 
        SELECT COALESCE(SUM(payment_amount), 0) as total,
               COALESCE(SUM(CASE WHEN paid_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN payment_amount ELSE 0 END), 0) as monthly
        FROM payments
        WHERE payment_status = 'completed'
     | Params: []
[2026-02-02 18:32:13] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_amount' in 'field list' | SQL: 
        SELECT COALESCE(SUM(payment_amount), 0) as total,
               COALESCE(SUM(CASE WHEN paid_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN payment_amount ELSE 0 END), 0) as monthly
        FROM payments
        WHERE payment_status = 'completed'
     | Params: []
[2026-02-02 18:42:28] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payment_amount' in 'field list' | SQL: 
        SELECT COALESCE(SUM(payment_amount), 0) as total,
               COALESCE(SUM(CASE WHEN paid_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN payment_amount ELSE 0 END), 0) as monthly
        FROM payments
        WHERE payment_status = 'completed'
     | Params: []
[2026-02-02 22:22:30] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.settings' doesn't exist | SQL: SELECT setting_key, setting_value FROM settings | Params: []
[2026-02-03 18:50:53] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'is_published' in 'field list' | SQL: INSERT INTO courses (title, short_description, description, category_id, price, currency, is_published, visibility, instructor_id, slug, status, created_at, created_by, region) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: ["Basic Security Foundation","security foundation","security foundation",2,50000,"USD",1,"public",7,"basic-security-foundation","draft","2026-02-03 18:50:53",7,"usa"]
[2026-02-03 23:01:23] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.course_reviews' doesn't exist | SQL: SELECT c.*, cat.name as category_name, cat.slug as category_slug,
                       u.first_name, u.last_name, u.username as instructor_username,
                       (SELECT AVG(rating) FROM course_reviews WHERE course_id = c.id) as avg_rating,
                       (SELECT COUNT(*) FROM course_reviews WHERE course_id = c.id) as review_count
                FROM courses c
                LEFT JOIN categories cat ON c.category_id = cat.id
                LEFT JOIN users u ON c.instructor_id = u.id
                WHERE c.id = ? | Params: [1]
[2026-02-03 23:07:02] Database Error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module_id' cannot be null | SQL: INSERT INTO course_lessons (module_id, course_id, title, description, content_type, content_url, content_text, downloadable_resources, is_published) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0) | Params: [null,1,"Security 101","Security 101","text",null,"Security 101","[\"uploads\\\/courses\\\/1\\\/lessons\\\/1770160021_Ghana_ODC_Presentation-TDI.pptx\",\"uploads\\\/courses\\\/1\\\/lessons\\\/1770160022_Michael.pptx\"]"]
[2026-02-15 16:27:14] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.agreement_templates' doesn't exist | SQL: SELECT t.*, c.title AS course_title, u.username AS creator_username
     FROM agreement_templates t
     LEFT JOIN courses c ON t.course_id = c.id
     LEFT JOIN users u ON t.created_by = u.id
     
     ORDER BY t.sort_order ASC, t.id DESC | Params: []
[2026-02-19 22:15:16] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.agreement_templates' doesn't exist | SQL: SELECT t.*, c.title AS course_title, u.username AS creator_username
     FROM agreement_templates t
     LEFT JOIN courses c ON t.course_id = c.id
     LEFT JOIN users u ON t.created_by = u.id
     
     ORDER BY t.sort_order ASC, t.id DESC | Params: []
[2026-02-19 22:15:21] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.agreement_templates' doesn't exist | SQL: SELECT t.*, c.title AS course_title, u.username AS creator_username
     FROM agreement_templates t
     LEFT JOIN courses c ON t.course_id = c.id
     LEFT JOIN users u ON t.created_by = u.id
     
     ORDER BY t.sort_order ASC, t.id DESC | Params: []
[2026-02-19 22:19:46] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.agreement_templates' doesn't exist | SQL: SELECT t.*, c.title AS course_title, u.username AS creator_username
     FROM agreement_templates t
     LEFT JOIN courses c ON t.course_id = c.id
     LEFT JOIN users u ON t.created_by = u.id
     
     ORDER BY t.sort_order ASC, t.id DESC | Params: []
[2026-03-04 08:49:25] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.notification_logs' doesn't exist | SQL: INSERT INTO notification_logs (user_id, channel, provider, recipient, subject, message, status, error_message, meta, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: [12,"email","smtp","michaeloseibobie@gmail.com","Welcome to SmartThink LMS","Hi Michael Osei-Bobie,Welcome to SmartThink, your global learning platform.Your account has been created successfully with the following details:Username: michaeloseibobie@gmail.comYou can log in anytime at: http:\/\/localhost\/smartthink\/lms\/login.phpFor your security, please change your password after your first login.Happy learning!SmartThink Team","failed","sendEmail returned false",null,"2026-03-04 08:49:25"]
[2026-03-04 08:49:26] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.notification_logs' doesn't exist | SQL: INSERT INTO notification_logs (user_id, channel, provider, recipient, subject, message, status, error_message, meta, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: [12,"sms","mnotify","+1243198125",null,"Welcome to SmartThink, Michael Osei-Bobie. Username: michaeloseibobie@gmail.com Login: http:\/\/localhost\/smartthink\/lms\/login.php Please change your password after first login.","failed","HTTP 401 response from mNotify","{\"http_code\":401,\"response\":\"{\\\"error\\\":\\\"invalid api key. please make sure your api key is valid and enabled\\\"}\",\"payload\":{\"recipient\":[\"+1243198125\"],\"sender\":\"SmartThink\",\"message\":\"Welcome to SmartThink, Michael Osei-Bobie. Username: michaeloseibobie@gmail.com Login: http:\\\/\\\/localhost\\\/smartthink\\\/lms\\\/login.php Please change your password after first login.\"},\"log_context\":{\"user_id\":12,\"type\":\"user_welcome\"}}","2026-03-04 08:49:26"]
[2026-03-04 16:05:30] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.enrollment_installments' doesn't exist | SQL: SELECT ei.id
     FROM enrollment_installments ei
     WHERE ei.status = 'pending'
       AND ei.due_date BETWEEN ? AND ?
       AND (ei.reminder_sent_at IS NULL OR ei.reminder_sent_at < DATE_SUB(NOW(), INTERVAL 1 DAY)) | Params: ["2026-03-04 16:05:30","2026-03-11 16:05:30"]
[2026-03-04 16:23:01] Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'smartthink.appointments' doesn't exist | SQL: SELECT * FROM appointments WHERE user_id = ? ORDER BY created_at DESC | Params: [12]
[2026-03-09 22:24:37] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'coh.cohort_type' in 'field list' | SQL: SELECT ce.*, c.title AS course_title, c.id AS course_id, c.region AS course_region, u.first_name, u.last_name, u.email, u.id AS student_id, coh.title AS cohort_title, coh.start_date AS cohort_start, coh.end_date AS cohort_end, coh.cohort_type AS cohort_type FROM course_enrollments ce JOIN courses c ON ce.course_id = c.id JOIN users u ON ce.student_id = u.id LEFT JOIN cohorts coh ON ce.cohort_id = coh.id WHERE ce.id = ? | Params: [5]
[2026-03-09 22:27:24] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cohort_type' in 'where clause' | SQL: SELECT * FROM agreement_templates
         WHERE is_active = 1
           AND (course_id IS NULL OR course_id = ?)
           AND (region = 'global' OR region = ?)
           AND (cohort_type IS NULL OR cohort_type = ?)
         ORDER BY (course_id IS NOT NULL AND course_id = ?) DESC,
                  (cohort_type IS NOT NULL AND cohort_type = ?) DESC,
                  (region = ?) DESC,
                  sort_order ASC,
                  id DESC
         LIMIT 1 | Params: [2,"global",null,2,null,"global"]
[2026-03-09 22:27:33] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cohort_type' in 'where clause' | SQL: SELECT * FROM agreement_templates
         WHERE is_active = 1
           AND (course_id IS NULL OR course_id = ?)
           AND (region = 'global' OR region = ?)
           AND (cohort_type IS NULL OR cohort_type = ?)
         ORDER BY (course_id IS NOT NULL AND course_id = ?) DESC,
                  (cohort_type IS NOT NULL AND cohort_type = ?) DESC,
                  (region = ?) DESC,
                  sort_order ASC,
                  id DESC
         LIMIT 1 | Params: [2,"global",null,2,null,"global"]
[2026-03-09 22:29:53] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'agreement_template_id' in 'field list' | SQL: INSERT INTO course_enrollment_agreements (enrollment_id, course_id, student_id, agreement_template_id, agreement_title, agreement_body, status, signed_at, signer_name, signer_email, signer_ip, signer_user_agent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: [5,2,13,null,"Training Agreement for Foundation to Internet Security","This Training Agreement (\"Agreement\") is between SmartThink and Douglas Osei (\"Student\").\n\nCourse: Foundation to Internet Security.\n\nBy proceeding with enrollment and payment, Student confirms that they have reviewed the course description, understands the training scope, and agrees to the code of conduct, attendance expectations, and refund policy published on the site.\n\nStudent acknowledges that access to course materials and any associated live sessions is provided for personal training purposes only and may not be shared, resold, or redistributed.\n\nBy accepting electronically, Student agrees that this constitutes their electronic signature to this Agreement.","signed","2026-03-09 22:29:53","Douglas Osei","michaeloseibobie@gmail.com","::1","Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/145.0.0.0 Safari\/537.36"]
[2026-03-12 16:04:22] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cohort_type' in 'field list' | SQL: INSERT INTO cohorts (course_id, instructor_id, region, cohort_type, title, max_capacity, start_date, end_date, status, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: [2,7,"global",null,"2026 First Cohort",10,"2026-03-11 16:04:00","2026-03-29 16:04:00","open","2026-03-12 16:04:22"]
[2026-03-12 16:04:31] Database Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cohort_type' in 'field list' | SQL: INSERT INTO cohorts (course_id, instructor_id, region, cohort_type, title, max_capacity, start_date, end_date, status, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | Params: [2,7,"global",null,"2026 First Cohort",10,"2026-03-11 16:04:00","2026-03-29 16:04:00","open","2026-03-12 16:04:31"]
