-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When using the typeorm migration:generate command, it generates a migration that includes all entities as if it’s the initial migration, rather than only generating changes since the last migration. This happens even when no model changes have been made, causing unnecessary and potentially destructive SQL to be generated.
Reproduction steps
- Create an initial migration using typeorm migration:generate.
- Run the migration and ensure the database is in sync.
- Run the migration generation command again without changing any entities:
Expected behavior
The migration generator should detect schema changes and only include operations related to actual differences between the current database schema and the entity definitions.
Additional information
This issue can lead to bloated migration files and potential conflicts in CI/CD pipelines. Could be related to missing metadata or incorrect dataSource configuration.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working