SELECT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_cleaning_settlements'
  AND column_name IN ('paid_by', 'payout_channel', 'payout_reference', 'payout_error');

SELECT constraint_name
FROM information_schema.table_constraints
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_cleaning_settlements'
  AND constraint_name = 'fk_qipai_cleaning_settlements_paid_by';

SELECT index_name
FROM information_schema.statistics
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_cleaning_settlements'
  AND index_name = 'idx_qipai_cleaning_settlement_payout'
GROUP BY index_name;

SELECT version
FROM qipai_schema_migrations
WHERE version = '2026062728';
