In Typeorm, migration: generate works fine when I create a new entity file or when I add a new column to the existing entity. But when I delete any entity file from the entities folder, it cannot detect it. For my case this is src/models/*.ts
In Typeorm, migration: generate works fine when I create a new entity file or when I add a new column to the existing entity. But when I delete any entity file from the entities folder, it cannot detect it. For my case this is src/models/*.ts
I think this is a wanted behaviour. What you want is a match between entity and table, when the entity is deleted TypeORM should generate a migration file where the table will be deleted. But there are often tables which have no entity representation, but should not be removed.
In your case you need to manually create an empty migration file typeorm migration:create -c default -n DropTable and drop the table.