Include custom attr table in database cleanup

This commit is contained in:
MM20
2022-09-25 19:24:31 +02:00
parent 41766cc0ac
commit f1dbb84f61
3 changed files with 20 additions and 2 deletions
@@ -47,4 +47,7 @@ interface BackupRestoreDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun importCustomAttributes(items: List<CustomAttributeEntity>)
@Query("DELETE FROM CustomAttributes WHERE (type = 'tag' OR type = 'label') AND NOT EXISTS(SELECT 1 FROM Searchable WHERE CustomAttributes.key = Searchable.key)")
suspend fun cleanUp(): Int
}