loopbackio / loopbackio/loopback-next
Database Migration Management Framework
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 1.1k
- Merge medio
- 2g 21h
- PR unite (30g)
- 27
Descrizione
_From @kjdelisle on July 28, 2017 18:37_
## Scenario
FooCorp wants to deploy version 2.0 of their LoopBack application on their production server, but doing so will require some alteration of the schema in their database. Some of these changes require a more delicate touch that cannot necessarily be performed by the `autoupdate` function.
Currently, FooCorp would have to create their own scripts and execute them to modify their database schema to match their expectations, which may require them to more directly interface with drivers that are used by their chosen LoopBack connector, or using another implementation entirely!
## Proposal
Create a component for use in loopback-next that handles the idea of production-system migration within a LoopBack application as it is upgraded from one release to another.
Originally, I had a design in my mind for how this would work, but I noticed that there are some generic migration tools on npm (https://www.npmjs.com/package/migration), and I was wondering if there was anything additional that we'd want to add to make it easier to do this sort of thing.
Martin Fowler's [Evolutionary Database Design](https://www.martinfowler.com/articles/evodb.html) provides a comprehensive information on this topic, including implementation examples.
Other ORM frameworks have been supporting migrations for quite some time, we can inspire from them.
- [Migrations in Ruby on Rails](https://guides.rubyonrails.org/v3.2/migrations.html)
- [.NET EntityFramework's Code First Migrations](https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
La proposta non indica file del repository, test o punti di ingresso. Inizia esaminando l’idea del package di migrazione e gli esempi citati di Evolutionary Database Design e migrazioni ORM; il lavoro sarebbe completato quando fossero disponibili un design concordato per le migrazioni in produzione e la relativa implementazione in loopback-next.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- nodejs, typescript
- Ambito
- backend, databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100