-- Update the download URL for an existing version
-- Use this if you need to change the GitHub release URL after creation
--
-- INSTRUCTIONS:
-- 1. Replace VERSION_NUMBER with the version to update
-- 2. Replace NEW_DOWNLOAD_URL with the corrected GitHub release URL
-- 3. Run against the WordChat backend database

UPDATE plugin_versions
SET
    download_url = '<DOWNLOAD_URL>',  -- UPDATE THIS
    created_at = NOW()
WHERE version = '<VERSION>'  -- UPDATE THIS
  AND plugin_slug = 'wordchat-pro';

-- Verify the update
SELECT
    version,
    download_url,
    created_at
FROM plugin_versions
WHERE version = '<VERSION>'  -- UPDATE THIS
  AND plugin_slug = 'wordchat-pro';
