question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Proposal] cli show migration enhancement

See original GitHub issue

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: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:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pleerockcommented, May 21, 2019

Looks like this functionality can be useful, feel free to go with PR

1reaction
izaylcommented, Apr 12, 2019

why not add a flag to specific migration.

e.g

$ ts-node ./node_modules/typeorm/cli.js migration:run --target-migration
$ ts-node ./node_modules/typeorm/cli.js migration:revert --target-migration
Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax of the CLI Migrate Command - VMware Docs
Confirms acknowledgement of your VMware Customer Experience Improvement Program (CEIP) participation. This argument is required if ceip.enabled ...
Read more >
Migrate databases at scale using automation (Preview)
An enhanced assessment mechanism can evaluate SQL Server instances, identifying databases ready for migration to the different Azure SQL targets ...
Read more >
Upgrade and Migration Guide for Cisco Unified ...
Upgrade and Migration Overview. The procedures in this book describe how to upgrade Cisco Unified Communications Manager and the IM and ...
Read more >
Using the Tableau Content Migration Tool Console Runner
Shows a summary of the migration plan and then exits. tabcmt-runner --info <plan file>. help. Shows usage information for the command line utility ......
Read more >
Migrate a Planner plan to a List using CLI for Microsoft365
Attachments are not migrated; while we can retrieve those values with m365 planner task details get; The card view still shows the number ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found