Support "rename field" in automatic migration generator
Maintainer thường phản hồi trong vòng 1 ngày
@Soroushsrd đang làm issue này rồi.
Từ ngày 15/4/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
We should support renaming fields in the automatic migration generator.
This is more complicated than most of the other operations. This is because we can't reliably detect renaming fields (we only see that a field has been removed and then created). For starters, we could detect if a field was renamed by keeping all of its properties intact. Then, we could add some heuristics (like for instance, we see that a field was removed but then recreated with most of its original properties). This, however, needs to be interactive—we need to ask the developer if they actually renamed the field (and then create either a rename, or delete+create operations depending on their reply).
The entry point is probably somewhere in the make_alter_model_operations function: https://github.com/cot-rs/cot/blob/2bbb09699bf7b74c41bb323338a02c528de1acff/cot-cli/src/migration_generator.rs#L329
This will require adding a new OperationInner variant: https://github.com/cot-rs/cot/blob/2bbb09699bf7b74c41bb323338a02c528de1acff/cot/src/db/migrations.rs#L460
Note that the "rename field" operation will need to store the old name of the field, so that an implementation of Operation::backwards can be created.
- Ngôn ngữ chính
- Rust
- Star
- 1.1k
- Fork
- 57
- Merge trung bình
- 17 giờ 39 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của cot-rs/cot
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add changelog pageĐang mởA-docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add CLI Reference pageĐang mởA-docs
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Request and Extractor DocsĐang mởA-docs
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Routing docsCó thể làm lại được @ElijahAhianyo đã nhận 43 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
cot-rs/cot#688 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
code-quality parser
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
eventflux-io/eventflux#218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
StartSso docs say an option requires the built-in AuthnRequest renderer, which is now the only oneĐang mởdocumentation needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày