From: Nathan Wagner Date: Sun, 21 Oct 2018 08:35:47 +0000 (+0000) Subject: remove unused install_status view X-Git-Tag: v0.2.16~65 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=b6e8d469897f58ed6ddd5e428acdac0f4a597e4e remove unused install_status view --- 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,