SELECT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_recharge_orders'
  AND column_name IN (
    'payment_provider',
    'provider_prepay_id',
    'provider_payment_id',
    'provider_callback_id',
    'raw_notify'
  );

SELECT index_name
FROM information_schema.statistics
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_recharge_orders'
  AND index_name IN (
    'uq_qipai_recharge_provider_payment',
    'uq_qipai_recharge_provider_callback'
  );
