ALTER TABLE lesson_types ADD COLUMN system_key TEXT DEFAULT NULL;
CREATE UNIQUE INDEX IF NOT EXISTS idx_lesson_types_tenant_system_key ON lesson_types (tenant_id, system_key) WHERE system_key IS NOT NULL;
