X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=db.sql;h=c7040349b38dc2004ed9970eb3e9ca9a414da33a;hb=30aa9bfe1e9a0e682f7c942b8e68054551f14857;hp=0a02470bf807c61cd4c42d959d4d6a549b1fa02f;hpb=2b364ea3ad8359fce5ed40596ba486534b9fd992;p=zpackage diff --git a/db.sql b/db.sql index 0a02470..c704034 100644 --- a/db.sql +++ b/db.sql @@ -218,51 +218,6 @@ select * from packagefiles_status where status = 'installed' ; -create view install_status as - -select 'new' as op, PN.* -from packagefiles_status PN -left join installed_ref_count RC on RC.path = PN.path -where RC.refcount is null -and PN.status = 'installing' - -union all - -select 'update' as op, PN.* -from packagefiles_status PN -inner join installedfiles PI on PI.path = PN.path and PI.package = PN.package -left join installed_ref_count RC on RC.path = PN.path -where RC.refcount = 1 -and PN.status = 'installing' -and PI.hash is not PN.hash - -union all - -select 'conflict' as op, PI.* -from packagefiles_status PN -inner join installedfiles PI on PI.path = PN.path and PI.package != PN.package -where PN.status = 'installing' - -union all -select 'remove' as op, PI.* -from installedfiles PI -left join packagefiles_status PN - on PI.path = PN.path and PI.package = PN.package - and PI.pkgid != PN.pkgid -where PN.path is null -and PI.package in (select package from packages where status = 'installing') - -union all --- remove files in removing, but not installing -select distinct 'remove' as op, PR.* -from packagefiles_status PR -left join packagefiles_status PN -on PR.path = PN.path -and PR.pkgid != PN.pkgid and PN.status in ('installing', 'installed') -where PN.path is null -and PR.status = 'removing' -; - create table pathtags ( -- package id triple package text,