Made migrations. Now it's nessesary to add migrations when changes are made in db.
The command - npm run typeorm migration:generate -- -n - will generate a migration file if changes are made compared to the db.
When you launch the app, a migration:run command will be called. This will apply the newly migration.
If you want to revert a migration, npm run typeorm migration:revert can be called. It will revert the latest migration.
If you are in doubt which migrations has been called or not, you can write npm run typeorm migration:show. This will show you the pending/fulfilled migrations.
Made migrations. Now it's nessesary to add migrations when changes are made in db.
The command - npm run typeorm migration:generate -- -n - will generate a migration file if changes are made compared to the db.
When you launch the app, a migration:run command will be called. This will apply the newly migration.
If you want to revert a migration, npm run typeorm migration:revert can be called. It will revert the latest migration.
If you are in doubt which migrations has been called or not, you can write npm run typeorm migration:show. This will show you the pending/fulfilled migrations.