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

SELECT table_name, column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_auth_sessions'
  AND column_name IN ('refresh_token_hash', 'refresh_expires_at')
ORDER BY column_name;

SELECT table_name, index_name
FROM information_schema.statistics
WHERE table_schema = DATABASE()
  AND ((table_name = 'qipai_admin_credentials'
      AND index_name IN ('uq_qipai_admin_credentials_login', 'uq_qipai_admin_credentials_user'))
    OR (table_name = 'qipai_auth_sessions'
      AND index_name = 'idx_qipai_auth_sessions_refresh'))
GROUP BY table_name, index_name
ORDER BY table_name, index_name;

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