vetkit.data-access.destructive-schema-sync.typeorm
TypeORM synchronize: true is set unconditionally, so every application start changes the database schema to match the entities. Renaming or removing a property drops the column and its data in production, without a reviewed migration.
Last updated:
Suite: Production readiness
javascript, typescript
TypeORM synchronize: true is set unconditionally, so every application start changes the database schema to match the entities. Renaming or removing a property drops the column and its data in production, without a reviewed migration.
Category: DATABASE · Engine rule severity: WARNING
How to fix it
Set synchronize: false outside local development (for example synchronize: process.env.NODE_ENV === 'development') and change the schema with generated, reviewed migrations that run during deploy (migrationsRun or typeorm migration:run).
References
Source: packages/engine/rules/data-access/javascript.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.