[Proposal] cli show migration enhancement
See original GitHub issueIssue type:
[ ] question [ ] bug report [X] feature request [ ] documentation issue
Database system/driver:
[X] cordova
[X] mongodb
[X] mssql
[X] mysql
/ mariadb
[X] oracle
[X] postgres
[X] cockroachdb
[X] sqlite
[X] sqljs
[X] react-native
[X] expo
TypeORM version:
[X ] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Goals
To have greater confidence before applying / reverting migrations on a database.
Current state
Currently when running migrations from the cli useful information such as which migrations have been executed and the specific sql which would be run are displayed after the fact.
ts-node ./node_modules/typeorm/cli.js migration:run
Proposal
We propose to have functionality similar to https://docs.djangoproject.com/en/2.2/ref/django-admin/#django-admin-showmigrations which will allow the developer to receive the additional information before applying the changes.
e.g some options
# New command (which would list which has been applied or not and developer can determine which is going to be run / reverted)
ts-node ./node_modules/typeorm/cli.js migration:show
# additional flag
ts-node ./node_modules/typeorm/cli.js migration:run --plan
ts-node ./node_modules/typeorm/cli.js migration:revert --plan
Hoping to generate some discussion on the feature and we are happy to do the work and make the PR.
cc @Juddling
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:5 (4 by maintainers)
Top GitHub Comments
Looks like this functionality can be useful, feel free to go with PR
why not add a flag to specific migration.
e.g