loopbackio / loopbackio/loopback-next
Database Migration Management Framework
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 5.1k
- Fork
- 1.1k
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 27
Mô tả
_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)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Đề xuất không nêu tệp repository, các bài kiểm thử hoặc các entry point. Hãy bắt đầu bằng việc xem xét ý tưởng về migration package và các ví dụ được tham chiếu về Evolutionary Database Design và ORM migration; công việc được xem là hoàn tất khi có một thiết kế migration production được thống nhất và phần triển khai thiết kế đó trong loopback-next.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- backend, databases
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100