diff --git a/packages/services/conversation-service/src/app.module.ts b/packages/services/conversation-service/src/app.module.ts index aa53e22..0e96585 100644 --- a/packages/services/conversation-service/src/app.module.ts +++ b/packages/services/conversation-service/src/app.module.ts @@ -25,8 +25,8 @@ import { HealthModule } from './health/health.module'; password: configService.get('POSTGRES_PASSWORD'), database: configService.get('POSTGRES_DB', 'iconsulting'), entities: [__dirname + '/**/*.entity{.ts,.js}'], - // 自动同步数据库schema - 确保Entity与数据库100%一致 - synchronize: true, + // 生产环境禁用synchronize,使用init-db.sql初始化schema + synchronize: false, logging: configService.get('NODE_ENV') === 'development', }), }),