Files
AIclinicalresearch/backend/src/tests/verify-test1-database.sql
HaHafeng 179afa2c6b feat(rvw): Complete RVW module development Phase 1-3
Summary:
- Migrate backend to modules/rvw with v2 API routes (/api/v2/rvw)
- Add new database fields: selectedAgents, editorialScore, methodologyStatus, picoExtract, isArchived
- Create frontend module in frontend-v2/src/modules/rvw
- Implement Dashboard with task list, filtering, batch operations
- Implement ReportDetail with dual tabs (editorial/methodology)
- Implement AgentModal for intelligent agent selection
- Register RVW module in moduleRegistry.ts
- Add navigation entry in TopNavigation
- Update documentation for RVW module status (v3.0)
- Update system status document (v2.9)

Features:
- User can select agents: editorial, methodology, or both
- Support batch task execution
- Task status filtering
- Replace console.log with logger service
- Maintain v1 API backward compatibility

Tested: Frontend and backend verified locally
Status: 85% complete (Phase 1-3 done)
2026-01-07 22:39:08 +08:00

119 lines
2.6 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================
-- 验证测试1的数据库状态
-- ============================================
\echo '=========================================='
\echo '1. 检查 app_cache 表是否存在'
\echo '=========================================='
\dt platform_schema.app_cache
\echo ''
\echo '=========================================='
\echo '2. 查看表结构'
\echo '=========================================='
\d platform_schema.app_cache
\echo ''
\echo '=========================================='
\echo '3. 查看索引'
\echo '=========================================='
SELECT indexname, indexdef
FROM pg_indexes
WHERE schemaname = 'platform_schema'
AND tablename = 'app_cache';
\echo ''
\echo '=========================================='
\echo '4. 检查测试数据是否清理应为0行'
\echo '=========================================='
SELECT COUNT(*) as test_data_count
FROM platform_schema.app_cache
WHERE key LIKE 'test:%';
\echo ''
\echo '=========================================='
\echo '5. 查看所有缓存数据'
\echo '=========================================='
SELECT id, key,
LEFT(value::text, 50) as value_preview,
expires_at,
created_at
FROM platform_schema.app_cache
ORDER BY created_at DESC
LIMIT 10;
\echo ''
\echo '=========================================='
\echo '6. 查看表统计信息'
\echo '=========================================='
SELECT
COUNT(*) as total_records,
pg_size_pretty(pg_total_relation_size('platform_schema.app_cache')) as total_size,
pg_size_pretty(pg_relation_size('platform_schema.app_cache')) as table_size,
pg_size_pretty(pg_indexes_size('platform_schema.app_cache')) as indexes_size
FROM platform_schema.app_cache;
\echo ''
\echo '=========================================='
\echo '7. 测试写入和删除(不会影响现有数据)'
\echo '=========================================='
-- 插入测试数据
INSERT INTO platform_schema.app_cache (key, value, expires_at, created_at)
VALUES ('verify_test', '{"status": "ok"}', NOW() + INTERVAL '1 hour', NOW());
-- 验证插入
SELECT 'INSERT 成功' as result
FROM platform_schema.app_cache
WHERE key = 'verify_test';
-- 删除测试数据
DELETE FROM platform_schema.app_cache WHERE key = 'verify_test';
-- 验证删除
SELECT CASE
WHEN COUNT(*) = 0 THEN 'DELETE 成功'
ELSE 'DELETE 失败'
END as result
FROM platform_schema.app_cache
WHERE key = 'verify_test';
\echo ''
\echo '=========================================='
\echo '✅ 数据库验证完成!'
\echo '=========================================='