From 5030b47f4e4c8e2fac176ca6673aeeacdb45402f Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Tue, 30 Sep 2025 18:47:16 +0000 Subject: [PATCH] Delete fix_crypto_payment_statuses.sql --- fix_crypto_payment_statuses.sql | 51 --------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 fix_crypto_payment_statuses.sql diff --git a/fix_crypto_payment_statuses.sql b/fix_crypto_payment_statuses.sql deleted file mode 100644 index cdee1ac..0000000 --- a/fix_crypto_payment_statuses.sql +++ /dev/null @@ -1,51 +0,0 @@ --- SQL Migration Script: Update Crypto Payment Status Names --- Renames state values in mps_crypto_payment table to match new code constants --- Run this before deploying the updated codebase - -BEGIN TRANSACTION; - --- Update confirmed-overpaid states to confirmed-overpay -UPDATE mps_crypto_payment -SET status = 'confirmed-overpay' -WHERE status = 'confirmed-overpaid'; - -UPDATE mps_crypto_payment -SET status = 'confirmed-overpay-refunded' -WHERE status = 'confirmed-overpaid-refunded'; - -UPDATE mps_crypto_payment -SET status = 'confirmed-overpay-refunded-complete' -WHERE status = 'confirmed-overpaid-refunded-complete'; - --- Update expired-refunded states to latepay-refunded -UPDATE mps_crypto_payment -SET status = 'latepay-refunded' -WHERE status = 'expired-refunded'; - -UPDATE mps_crypto_payment -SET status = 'latepay-refunded-complete' -WHERE status = 'expired-refunded-complete'; - --- Update any not-refunded states (if they exist) -UPDATE mps_crypto_payment -SET status = 'confirmed-overpay-not-refunded' -WHERE status = 'confirmed-overpaid-not-refunded'; - -UPDATE mps_crypto_payment -SET status = 'latepay-not-refunded' -WHERE status = 'expired-not-refunded'; - --- Verify the changes -SELECT 'Updated status counts:' as info; -SELECT status, COUNT(*) as count -FROM mps_crypto_payment -GROUP BY status -ORDER BY status; - --- Commit the transaction -COMMIT; - --- Instructions: --- 1. Backup your database first: cp data/make_post_sell.sqlite data/make_post_sell.sqlite.backup-$(date +%Y%m%d-%H%M%S) --- 2. Run this script: sqlite3 data/make_post_sell.sqlite < fix_crypto_payment_statuses.sql --- 3. Verify results by checking the status counts above \ No newline at end of file