DELETE FROM qipai_schema_migrations WHERE version = '2026062015';
DROP TABLE IF EXISTS qipai_payment_configs;
DROP TABLE IF EXISTS qipai_profit_shares;
DROP TABLE IF EXISTS qipai_refunds;
DROP TABLE IF EXISTS qipai_payment_callbacks;
DROP TABLE IF EXISTS qipai_payment_attempts;
ALTER TABLE qipai_payments
  DROP INDEX uq_qipai_payments_provider_id,
  DROP INDEX uq_qipai_payments_client_request,
  DROP FOREIGN KEY fk_qipai_payments_store,
  DROP FOREIGN KEY fk_qipai_payments_platform_app,
  DROP COLUMN failure_code,
  DROP COLUMN failed_at,
  DROP COLUMN provider_payment_id,
  DROP COLUMN currency,
  DROP COLUMN client_request_id,
  DROP COLUMN provider,
  DROP COLUMN store_id,
  DROP COLUMN platform_app_id;
