X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=db.sql;h=42eeb067cc0a824de9204613bf74a520ba9ca0af;hb=9acfd23b8707b49d642b3dc3f1ea531cba88604c;hp=1ad3d17e5da68361a998dc1ea5ab4bf7db44b90d;hpb=7256198c4677c64fde0da2dc0bd14f29db799ca3;p=zpackage diff --git a/db.sql b/db.sql index 1ad3d17..42eeb06 100644 --- a/db.sql +++ b/db.sql @@ -171,6 +171,7 @@ without rowid create index packagefile_package_index on packagefiles (package); create index packagefile_path_index on packagefiles (path); create index packagefile_hash_index on packagefiles (hash); +create index pkgfile_configuration on packagefiles (configuration) where configuration = 1; create view packagefiles_pkgid as select printf('%s-%s-%s', package, version, release) as pkgid, *, @@ -427,8 +428,7 @@ md_conflict as ( on PA.package = PFA.package and PA.version = PFA.version and PA.release = PFA.release where PA.status in ('installing', 'installed') group by path - having (count(distinct - printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname) + having (count(distinct printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname) ) > 1 or count(distinct PFA.hash) > 1) ) select PFH.*,