rel-eng/packages/spacewalk-schema | 2 schema/spacewalk/spacewalk-schema.spec | 5 - schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql | 45 --------- schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.oracle | 45 +++++++++ schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.postgresql | 48 ++++++++++ 5 files changed, 98 insertions(+), 47 deletions(-)
New commits: commit d39d2493b126aedc38b78f46e1ee8b99bf59bc7a Author: Michael Mraka michael.mraka@redhat.com Date: Mon Feb 24 15:30:23 2014 +0100
Automatic commit of package [spacewalk-schema] release [2.1.50-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema index d48d611..d024e16 100644 --- a/rel-eng/packages/spacewalk-schema +++ b/rel-eng/packages/spacewalk-schema @@ -1 +1 @@ -2.1.49-1 schema/spacewalk/ +2.1.50-1 schema/spacewalk/ diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec index fbd35ad..d418666 100644 --- a/schema/spacewalk/spacewalk-schema.spec +++ b/schema/spacewalk/spacewalk-schema.spec @@ -4,7 +4,7 @@ Name: spacewalk-schema Group: Applications/Internet Summary: Oracle SQL schema for Spacewalk server
-Version: 2.1.49 +Version: 2.1.50 Release: 1%{?dist} Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/spacewalk-sql*
%changelog +* Mon Feb 24 2014 Michael Mraka michael.mraka@redhat.com 2.1.50-1 +- replacing view must have the same number of columns (in postgresql) + * Fri Feb 21 2014 Michael Mraka michael.mraka@redhat.com 2.1.49-1 - updated rhnServerOutdatePackages to include arch
commit 40ed682701210688060793e5126c9eda9d12022a Author: Michael Mraka michael.mraka@redhat.com Date: Mon Feb 24 15:26:39 2014 +0100
replacing view must have the same number of columns (in postgresql)
we have to drop & create; fixing psql:/var/log/spacewalk/schema-upgrade/20140223-173628-script.sql:6480: ERROR: cannot change name of view column "package_nvre" to "package_arch_id"
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql b/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql deleted file mode 100644 index 9dd3283..0000000 --- a/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql +++ /dev/null @@ -1,45 +0,0 @@ --- --- Copyright (c) 2008 Red Hat, Inc. --- --- This software is licensed to you under the GNU General Public License, --- version 2 (GPLv2). There is NO WARRANTY for this software, express or --- implied, including the implied warranties of MERCHANTABILITY or FITNESS --- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 --- along with this software; if not, see --- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. --- --- Red Hat trademarks are not licensed under GPLv2. No permission is --- granted to use or replicate Red Hat trademarks that are incorporated --- in this software or its documentation. --- - -CREATE OR REPLACE VIEW -rhnServerOutdatedPackages -( - server_id, - package_name_id, - package_evr_id, - package_arch_id, - package_nvre, - errata_id, - errata_advisory -) -AS -SELECT DISTINCT SNPC.server_id, - P.name_id, - P.evr_id, - P.package_arch_id, - PN.name || '-' || evr_t_as_vre_simple( PE.evr ), - E.id, - E.advisory - FROM rhnPackageName PN, - rhnPackageEVR PE, - rhnPackage P, - rhnServerNeededPackageCache SNPC - left outer join - rhnErrata E - on SNPC.errata_id = E.id - WHERE SNPC.package_id = P.id - AND P.name_id = PN.id - AND P.evr_id = PE.id; - diff --git a/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.oracle new file mode 100644 index 0000000..9dd3283 --- /dev/null +++ b/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.oracle @@ -0,0 +1,45 @@ +-- +-- Copyright (c) 2008 Red Hat, Inc. +-- +-- This software is licensed to you under the GNU General Public License, +-- version 2 (GPLv2). There is NO WARRANTY for this software, express or +-- implied, including the implied warranties of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 +-- along with this software; if not, see +-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +-- +-- Red Hat trademarks are not licensed under GPLv2. No permission is +-- granted to use or replicate Red Hat trademarks that are incorporated +-- in this software or its documentation. +-- + +CREATE OR REPLACE VIEW +rhnServerOutdatedPackages +( + server_id, + package_name_id, + package_evr_id, + package_arch_id, + package_nvre, + errata_id, + errata_advisory +) +AS +SELECT DISTINCT SNPC.server_id, + P.name_id, + P.evr_id, + P.package_arch_id, + PN.name || '-' || evr_t_as_vre_simple( PE.evr ), + E.id, + E.advisory + FROM rhnPackageName PN, + rhnPackageEVR PE, + rhnPackage P, + rhnServerNeededPackageCache SNPC + left outer join + rhnErrata E + on SNPC.errata_id = E.id + WHERE SNPC.package_id = P.id + AND P.name_id = PN.id + AND P.evr_id = PE.id; + diff --git a/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.postgresql new file mode 100644 index 0000000..8b46d19 --- /dev/null +++ b/schema/spacewalk/upgrade/spacewalk-schema-2.0-to-spacewalk-schema-2.1/051-rhnServerOutdatedPackages.sql.postgresql @@ -0,0 +1,48 @@ +-- oracle equivalent source sha1 a44b7d8db426c3c574001ccc9b90da1221ed7502 +-- +-- Copyright (c) 2008 Red Hat, Inc. +-- +-- This software is licensed to you under the GNU General Public License, +-- version 2 (GPLv2). There is NO WARRANTY for this software, express or +-- implied, including the implied warranties of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 +-- along with this software; if not, see +-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. +-- +-- Red Hat trademarks are not licensed under GPLv2. No permission is +-- granted to use or replicate Red Hat trademarks that are incorporated +-- in this software or its documentation. +-- + +DROP VIEW rhnServerOutdatedPackages; + +CREATE OR REPLACE VIEW +rhnServerOutdatedPackages +( + server_id, + package_name_id, + package_evr_id, + package_arch_id, + package_nvre, + errata_id, + errata_advisory +) +AS +SELECT DISTINCT SNPC.server_id, + P.name_id, + P.evr_id, + P.package_arch_id, + PN.name || '-' || evr_t_as_vre_simple( PE.evr ), + E.id, + E.advisory + FROM rhnPackageName PN, + rhnPackageEVR PE, + rhnPackage P, + rhnServerNeededPackageCache SNPC + left outer join + rhnErrata E + on SNPC.errata_id = E.id + WHERE SNPC.package_id = P.id + AND P.name_id = PN.id + AND P.evr_id = PE.id; +
spacewalk-commits@lists.fedorahosted.org