I was following this blog https://wanago.io/2022/07/25/api-nestjs-database-migrations-typeorm/ to setup migrations in my nestjs project but got the error that dataSourceFileExport i.e DataSource object exported from the migration.config.ts is not iterable. And I don’t know why it’s not iterable. I couldn’t find the solution on any platform
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
2
Answers
Change in
migration.config.ts
:This is a known issue introduced in TypeORM v0.3.8 and fixed in v0.3.9