SELECT 'qipai_recharge_plans' AS table_name
FROM information_schema.tables
WHERE table_schema = DATABASE() AND table_name = 'qipai_recharge_plans';

SELECT 'qipai_recharge_orders' AS table_name
FROM information_schema.tables
WHERE table_schema = DATABASE() AND table_name = 'qipai_recharge_orders';

SELECT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_recharge_plans'
  AND column_name IN (
    'pay_amount_cents', 'gift_amount_cents', 'purchase_limit_per_user',
    'scope_type', 'starts_at', 'ends_at', 'status'
  );

SELECT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_recharge_orders'
  AND column_name IN (
    'client_request_id', 'pay_amount_cents', 'gift_amount_cents',
    'payment_id', 'paid_at', 'credited_at', 'status'
  );

SELECT '2026062422' AS version
FROM qipai_schema_migrations
WHERE version = '2026062422';
