Command used for migrating all classes and attributes to the migration folder
npx typeorm-ts-node-esm migration:generate -d ./src/data-source.ts src/migration/InitialMigrationCommand to run all pending migrations to the database
npx typeorm-ts-node-esm migration:run -d ./src/data-source.ts Command to view your existing migrations table
npx typeorm-ts-node-esm schema:log -d ./src/data-source.ts if you are updating the existing migrations for your application, use the cmd,
npx typeorm-ts-node-esm migration:generate -d ./src/data-source.ts src/migration/<migrationName>if you are updating the existing migrations for your application, and it recreates the table again, use the cmd to create an empty migration file and write your safe migration in it,
npx typeorm-ts-node-esm migration:create ./src/packages/database/migrations/<migrationName> and then run the command afterwards
npx typeorm-ts-node-esm migration:run -d ./src/data-source.tsMake sure to replace your db credentials in your env with the ones provided by your deployment site (eg.render)
If your source directory folder is src, make sure to set it in your configuration in your deployment site