Migrations usage
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
I can’t understand how can I use migrations
with @nestjs/typeorm.
Expected behavior
As developer, I want to have a doc explaining how to use @nestjs/typeorm migrations
.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
Nest version: 5.0.0
For Tooling issues:
- Node version: 9.6.0
- Platform: Mac
Others:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:26 (4 by maintainers)
Top Results From Across the Web
Database Migration: What It Is and How to Do It - CloudBees
Now that you know how database migrations came about, let me walk you ... Option 2: Use Independent Database-Migration-Focused Software.
Read more >Usage - db-migrate - Read the Docs
To use db-migrate, you call it via the command line. When entering only the command without paramaters you will see something like this:...
Read more >Database Migrations: What are the Types of DB ... - Prisma
Discover how database migrations allow developers to make controlled, ... State vs change based migrations; How do you use database migrations?
Read more >Database migration: Concepts and principles (Part 1)
In some use cases, data is migrated from source databases to target databases unmodified. These straight-through migrations are typically ...
Read more >Database Migration: What It Is and How It Is Done | Astera
Database migration moves data from one database to another. Find out how you can expedite the process with a data migration tool.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe ultimately what people want from this is a NestJS way of running migrations, not a TypeORM way of running migrations which may or many not work with Nest.
Whilst that is doable through putting a config file here or duplicating something there, there isn’t a Nest way of doing it. A framework like Nest is beginning to provide an all encompassing solution to many of the things necessary to build an application; of which, migrations are one.
In an ideal world, Nest would facilitate a means by which to run or proxy the migrations of TypeORM (or whichever ORM people are using, Objection for example).
nest migrate
which perhaps runstypeorm migrate
with the configuration from Nest passed in would be it’s most simple form?I personally don’t want to have multiple cli tools installed to manage the framework and the application(s) built on it. There’s a fantastic plugin architecture but seemingly no way to integrate these plugins into the CLI. If nestjs/typeorm could register commands with Nestjs and Nestjs would bootstrap and pass information from things like the config and the container etc into that CLI then nestjs/typeorm could register commands like
nest migrate
etc.Providing a means by which for the various plugins to extend the CLI not only would help solve this particular issue, but simplifies the UX of the framework in its entirety.
On Wed, 12 Jun 2019 at 15:55, SriNath notifications@github.com wrote:
Actually, I don’t think we should copy & paste typeorm documentation and duplicate it inside Nest docs. The migrations feature has nothing to do with
@nestjs/typeorm
wrapper, you shall follow instructions written down here, as @BrunnerLivio mentioned.