Audit cascade rules between tables to simplify repo deletion

Đang mở
#581 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sql
Lĩnh vực
databases

Hướng nghiên cứu

Start by reading the table definitions and migrations to list every foreign key that points at the repo table, then compare that list against the deletion order in collectoss_utilities/deletes.py, which encodes what must go first. Decide per relation whether cascade or nullify is right and where the rule belongs (migration vs. model). Done when deleting a single repo row removes or clears everything that depends on it without running the external script.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

database needs-plan tech debt

currently the best way to handle "i want to remove this repo from the database" is a script/command in collectoss-utilities.

When we have the schema a little more cleaned up, I think its not unreasonable to expect CollectOSS to be responsible for its own schema.

IMO CollectOSS should properly set on-delete rules for things joined to the repo table to ensure that, if someone deletes a repo from the repo table, everything that depends on it is also deleted.

the ordering of the existing script should give lots of clues as to what should be deleted.

Ngôn ngữ chính
Python
Star
18
Fork
33
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của chaoss/CollectOSS

Tất cả issue của chaoss/CollectOSS

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.