Major Changes: - Database: Install pg_bigm/pgvector plugins, create test database - Python service: v1.0 -> v1.1, add pymupdf4llm/openpyxl/pypandoc - Node.js backend: v1.3 -> v1.7, fix pino-pretty and ES Module imports - Frontend: v1.2 -> v1.3, skip TypeScript check for deployment - Code recovery: Restore empty files from local backup Technical Fixes: - Fix pino-pretty error in production (conditional loading) - Fix ES Module import paths (add .js extensions) - Fix OSSAdapter TypeScript errors - Update Prisma Schema (63 models, 16 schemas) - Update environment variables (DATABASE_URL, EXTRACTION_SERVICE_URL, OSS) - Remove deprecated variables (REDIS_URL, DIFY_API_URL, DIFY_API_KEY) Documentation: - Create 0126 deployment folder with 8 documents - Update database development standards v2.0 - Update SAE deployment status records Deployment Status: - PostgreSQL: ai_clinical_research_test with plugins - Python: v1.1 @ 172.17.173.84:8000 - Backend: v1.7 @ 172.17.173.89:3001 - Frontend: v1.3 @ 172.17.173.90:80 Tested: All services running successfully on SAE
63 lines
1.1 KiB
TypeScript
63 lines
1.1 KiB
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
// 检查 iit_schema 的所有表
|
|
const tables: any[] = await prisma.$queryRaw`
|
|
SELECT table_schema, table_name
|
|
FROM information_schema.tables
|
|
WHERE table_schema = 'iit_schema'
|
|
ORDER BY table_name
|
|
`;
|
|
|
|
console.log('iit_schema 中的表:');
|
|
console.log(tables);
|
|
|
|
// 检查每个表的列结构
|
|
if (tables.length > 0) {
|
|
for (const t of tables) {
|
|
console.log(`\n--- ${t.table_name} 的列 ---`);
|
|
const cols: any[] = await prisma.$queryRawUnsafe(`
|
|
SELECT column_name, data_type, is_nullable
|
|
FROM information_schema.columns
|
|
WHERE table_schema = 'iit_schema' AND table_name = '${t.table_name}'
|
|
ORDER BY ordinal_position
|
|
`);
|
|
cols.forEach(c => console.log(` ${c.column_name}: ${c.data_type}`));
|
|
}
|
|
}
|
|
|
|
// 检查备份中 iit_schema 是否存在
|
|
console.log('\n\n检查备份文件中是否有 iit_schema...');
|
|
}
|
|
|
|
main()
|
|
.catch(console.error)
|
|
.finally(() => prisma.$disconnect());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|