]> pd.if.org Git - zpackage/commitdiff
remove unused install_status view
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 21 Oct 2018 08:35:47 +0000 (08:35 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sat, 3 Nov 2018 12:39:52 +0000 (12:39 +0000)
db.sql

diff --git a/db.sql b/db.sql
index 0a02470bf807c61cd4c42d959d4d6a549b1fa02f..c7040349b38dc2004ed9970eb3e9ca9a414da33a 100644 (file)
--- 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,