Cyclic migration dependencies
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reading the migration generation and dependency-sorting entry points in Cot; the issue does not name specific files or tests. Reproduce with the shown Posts and Tags models and inspect why the generated dependency forms a cycle. Done means cot migration make produces migrations that run without the reported cycle error for this case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have a model which refers to another through the ForeignKey<> type:
#[model]
pub struct Posts {
#[model(primary_key)]
pub id: Auto<i64>,
pub tag: ForeignKey<Tags>,
}
And the model it refers to:
#[model]
pub struct Tags {
#[model(primary_key)]
pub id: Auto<i64>,
}
I created a migration through cot migration make. When running, the following error is obtained:
failed to run the Cot project: ErrorImpl { inner: WithStatusCode(ErrorImpl { inner: MigrationError(MigrationSortError(CycleDetected(CycleDetected))), status_code: Some(500), .. }), status_code: None, .. }
The migration file contained the following, and setting it to an empty array solved the issue:
const DEPENDENCIES: &'static [::cot::db::migrations::MigrationDependency] = &[
::cot::db::migrations::MigrationDependency::model(
<crate::Tags::Tags as ::cot::db::Model>::APP_NAME,
<crate::Tags::Tags as ::cot::db::Model>::TABLE_NAME,
),
];
https://git.alexbissessur.dev/alex/alexbissessur.dev/src/branch/main/src/models The repo link, if that can give some extra context
- 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