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

SELECT column_name FROM information_schema.columns
WHERE table_schema = DATABASE() AND table_name = 'qipai_order_shares'
  AND column_name IN (
    'token_hash', 'allow_view_room', 'allow_open_door', 'allow_renew',
    'expires_at', 'revoked_at', 'last_used_at', 'use_count'
  )
ORDER BY column_name;

SELECT index_name FROM information_schema.statistics
WHERE table_schema = DATABASE() AND table_name = 'qipai_order_shares'
  AND index_name IN (
    'uq_qipai_order_share_token_hash',
    'idx_qipai_order_share_order',
    'idx_qipai_order_share_expiry'
  )
GROUP BY index_name ORDER BY index_name;

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