-- Tables affected: qt_pricelist_sync_status
-- recovery.not-started: safe to re-run; CREATE TABLE IF NOT EXISTS
-- recovery.partial: DROP TABLE IF EXISTS qt_pricelist_sync_status;
-- recovery.completed: no action needed
-- verify: qt_pricelist_sync_status table missing | SELECT 1 FROM information_schema.TABLES WHERE table_schema=DATABASE() AND table_name='qt_pricelist_sync_status' HAVING COUNT(*)=0

CREATE TABLE IF NOT EXISTS qt_pricelist_sync_status (
    username VARCHAR(100) NOT NULL,
    last_sync_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    app_version VARCHAR(64) NULL,
    PRIMARY KEY (username),
    INDEX idx_qt_pricelist_sync_status_last_sync (last_sync_at)
);
