Audit cascade rules between tables to simplify repo deletion

オープン
#581 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, sql
領域
databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
18
フォーク
33
平均マージ
2日 16時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

chaoss/CollectOSS のほかの issue

chaoss/CollectOSS の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。