Circular foreign key references
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
- 30/100
Hướng nghiên cứu
Không có tệp schema hoặc test nào được nêu. Bắt đầu bằng cách tìm các định nghĩa và tham chiếu của BLSample.blSubSampleId và DataCollection.strategySubWedgeOrigId, sau đó kiểm tra cách chúng được sử dụng tại DLS và chạy lại lệnh sqlacodegen. Được xem là hoàn tất khi mục đích và quyết định loại bỏ cả hai cột đã được ghi lại, đồng thời các thay đổi schema bị ảnh hưởng đã được thống nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Attempting to generate sqlalchemy models via sqlacodegen leads to the following warning/error:
sqlacodegen mysql+pymysql://user:password@host:port/ispyb_build --noinflect > models.py
/Users/rjgildea/software/cctbx_py3/conda_base/lib/python3.8/site-packages/sqlalchemy/sql/ddl.py:1213: SAWarning: Cannot correctly sort tables; there are unresolvable cycles between tables "BLSample, BLSampleImage, BLSubSample, DataCollection, Screening, ScreeningOutput, ScreeningStrategy, ScreeningStrategySubWedge, ScreeningStrategyWedge", which is usually caused by mutually dependent foreign key constraints. Foreign key constraints involving these tables will not be considered; this warning may raise an error in a future release.
util.warn(
This appears to be the result of two circular foreign key references:
BLSample -> BLSubSample -> BLSampleImage -> BLSample (via BLSample.blSubSampleId)
and
DataCollection -> screeningStrategySubWedge -> ScreeningStrategyWedge -> ScreeningStrategy -> Screening -> DataCollection (via DataCollection.strategySubWedgeOrigId).
As far as I can tell, both BLSample.blSubSampleId and DataCollection.strategySubWedgeOrigId appear to be unused at DLS. I don't understand what purpose either column serves. Can these columns be removed from the table?
- Ngôn ngữ chính
- Shell
- Star
- 7
- Fork
- 13
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 DiamondLightSource/ispyb-database
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
-
Auto-generate database diagramĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
SQL lintingĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Tất cả issue của DiamondLightSource/ispyb-database
Issue tương tự
-
bug-unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[pico][astrocade] emu/apply.sh edits src/mame/midway/astrohome.cpp, which current MAME has in bally/Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
FujiNetWIFI/fujinet-firmware#2120 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
enhancement
Độ khó 2/5 1-3 giờ 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
-
area:terraform priority:low source:reader type:enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
stephrobert/blog-roadmap#104 ·