Skip to content

Ensure categories are not shown unless there are apps in them

Note: To be hot fixed into 0.102.1 also when merged.

Fixes #806 (closed). Also adds tests to hopefully prevent this from regressing in the future.

Ensure app-category join table is cleared out properly upon disabling repo.

There are certain things we can leave in the database even when they are not being used. The criteria for this is: * Could it be used again in the future? * Can it be excluded from queries easily while it is unused?

Examples are entries in the package table, and entries in the category table.

This fixes a problem where entries in the category-app join table stayed in the database, causing categories to be considered as "in use" when really there were no apps in those categories. These rows need to be removed, because when new apps are added again in the future, they will have different primary keys. These different primary keys mean that the rows in the category-app table will never be useful again, and thus should be removed.

Merge request reports