-- =============================================================================
-- 10-attendance-checkout-note.sql
-- Migration: AttendanceCheckoutNote1780990000000
-- Standard MySQL/MariaDB syntax. Safe to re-run migration INSERT only.
-- If column already exists, skip the ALTER line (error #1060).
-- =============================================================================

ALTER TABLE `attendances`
  ADD `checkout_note` varchar(191) NULL AFTER `note`;

INSERT INTO migrations (timestamp, name)
SELECT 1780990000000, 'AttendanceCheckoutNote1780990000000'
WHERE NOT EXISTS (
  SELECT 1 FROM migrations WHERE name = 'AttendanceCheckoutNote1780990000000'
);

SHOW COLUMNS FROM `attendances` LIKE 'checkout_note';
