SELECT column_name FROM information_schema.columns
WHERE table_schema = DATABASE() AND table_name = 'qipai_orders'
  AND column_name IN ('status_version', 'status_updated_at')
ORDER BY column_name;

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

SELECT index_name FROM information_schema.statistics
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_order_status_history'
  AND index_name IN (
    'uq_qipai_order_history_trace',
    'idx_qipai_order_history_order',
    'idx_qipai_order_history_status'
  )
GROUP BY index_name ORDER BY index_name;

SELECT version, name FROM qipai_schema_migrations WHERE version = '2026062012';
