-- Migration 062: Rename featureYTab → voiceNoteTab in all policy tables
-- The Android app now uses the canonical ID "voiceNoteTab" instead of the
-- legacy placeholder "featureYTab". This migration updates any existing rows.

UPDATE app_tabs
    SET tab_id = 'voiceNoteTab'
    WHERE tab_id = 'featureYTab';

UPDATE ftt_app_tabs
    SET tab_id = 'voiceNoteTab'
    WHERE tab_id = 'featureYTab';

UPDATE ftt_app_feature_policy
    SET tab_id = 'voiceNoteTab'
    WHERE tab_id = 'featureYTab';

-- app_tab_policy may not exist on all installs; use IF-style guard via IGNORE
UPDATE app_tab_policy
    SET tab_id = 'voiceNoteTab'
    WHERE tab_id = 'featureYTab';
