-- ============================================================
-- Migration: add theme preference to profiles,
--            add is_active flag to member_otps
-- Run once against your qr_profile_db database.
-- ============================================================

-- 1. Per-profile theme preference (default: 'sunset')
ALTER TABLE `profiles`
    ADD COLUMN `theme` VARCHAR(50) NOT NULL DEFAULT 'sunset'
    AFTER `youtube`;

-- 2. Soft-deactivation flag for OTPs
--    1 = active (can be used)   0 = superseded / invalidated
ALTER TABLE `member_otps`
    ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT 1
    AFTER `is_used`;
