Skip to content

Store categories in separate category table

Currently, the category that an app is in is recorded in the database via the fdroid_app.categories column, containing a comma separated list of strings. This makes it hard to query. The existing code to get a list of categories was pretty bad as a result.

This moves to a different data model whereby categories are stored in a separate table. Each repo is free to specify that an app is in arbitray caregories (as with before). This is represented by a join table between categories and app metadata.

The end result is that categories are much more a first class citizen than before, and they will be able to be queried easier - which is important for the new UI.

Note that the categories table need never be emptied, it can keep being appended to. The reason is that if there are no apps in a particular category (represented by no corresponding rows in the join table) then the category will not be shown to the user.

Merge request reports