Audit cascade rules between tables to simplify repo deletion

Abierto
#581 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, sql
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
18
Forks
33
Merge medio
2 d 16 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de chaoss/CollectOSS

Todos los issues de chaoss/CollectOSS

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.