-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Issue 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:runProposal
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 --planHoping to generate some discussion on the feature and we are happy to do the work and make the PR.
cc @Juddling