-- One-off migration: adds an auto_marked flag to lessons so the new
-- attendance:auto-mark-missed daily job (App\Console\Commands\AutoMarkMissedLessons)
-- can tag placeholder rows it creates for classes whose teacher never filled in the
-- attendance journal. Distinguishes "a real lesson was submitted" from "the system
-- auto-marked this slot as a paid absence because nobody acted" — the latter must
-- still be overwritable by a real teacher submission later (see
-- LessonSubmissionService::commitWithinTransaction()).
--
-- MySQL doesn't support IF NOT EXISTS on ADD COLUMN — safe to run once; re-running
-- will error with "Duplicate column name", which is harmless.

ALTER TABLE lessons ADD COLUMN auto_marked TINYINT(1) NOT NULL DEFAULT 0 AFTER payment;
