loopbackio / loopbackio/loopback-next
Database Migration Management Framework
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 5.1k
- 派生
- 1.1k
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 27
描述
_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)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该提案没有指出任何仓库文件、测试或入口点。首先审查 migration package 的构想,以及所引用的 Evolutionary Database Design 和 ORM migration 示例;完成标准是形成一致认可的生产迁移设计,并在 loopback-next 中实现该设计。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- nodejs, typescript
- 领域
- backend, databases
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100