When I run migration:generate and migration:run and the first time it generate me the CREATE TABLE and index fine and migrations runs perfect, but at the second time (without change anything in tables), it generate me ALTER TABLE DROP and ADD constraints queries of all entities again, like if synchronize was turn on.
At the second time without any changes in entities, the output of migration:generate should be empty in up() and down() functions.
At the next time with some changes in entities, the output should be SQL queries with only the changes I made, not changes I made + DROP/CREATES constraints.
Even I run it it throw me error saying "some constraints already exists"
Is there an existing issue for this?
Current behavior
When I run migration:generate and migration:run and the first time it generate me the CREATE TABLE and index fine and migrations runs perfect, but at the second time (without change anything in tables), it generate me ALTER TABLE DROP and ADD constraints queries of all entities again, like if synchronize was turn on.
Minimum reproduction code
https://github.com
Steps to reproduce
npm run migration:generate npm run migration:run
Expected behavior
At the second time without any changes in entities, the output of migration:generate should be empty in up() and down() functions.
At the next time with some changes in entities, the output should be SQL queries with only the changes I made, not changes I made + DROP/CREATES constraints.
Even I run it it throw me error saying "some constraints already exists"
Package version
10.0.1
NestJS version
10.2.4
Node.js version
21.1.0
In which operating systems have you tested?
Other
No response