Creating a migration with TypeORM
A migration in TypeORM means a SQL query made to sync an existing schema with the one in source.
To auto-generate migrations for your entities, use the TypeORM CLI.
Like:
shell
typeorm migration:generate -- -d ./dataSource.js ./path/to/NameOfMigration.tsWhere ./dataSource.js is a path to your data source.
And where ./path/to/NameOfMigration.ts is the desired path to the migration.
This command will generate a new file under ./path/to/1584188553162-NameOfMigration.ts, the timestamp given there is an example.
