I still have one key (49fc0fd89bd837ba) with a NULL provider_id. That one
isn't inserted in the schema_upgrade. Not sure what to use for the
'lookup_package_provider' function.

So, I checked out the code for the function (rhnschema=# \df+
lookup_package_provider;) and saw it queries rhnPackageProvider;

Anyone know which is the appropriate provided for key_id  49fc0fd89bd837ba?

rhnschema=# select * from rhnPackageProvider;
 id  |       name       |            created            |           modified
-----+------------------+-------------------------------+-------------------------------
 100 | Red Hat Inc.     | 2020-02-18 10:56:43.314315-05 | 2020-02-18
10:56:43.314315-05
 101 | Fedora           | 2020-02-18 10:56:43.316934-05 | 2020-02-18
10:56:43.316934-05
 102 | CentOS           | 2020-02-18 10:56:43.318202-05 | 2020-02-18
10:56:43.318202-05
 103 | Scientific Linux | 2020-02-18 10:56:43.319269-05 | 2020-02-18
10:56:43.319269-05
 104 | SUSE             | 2020-02-18 10:56:43.320548-05 | 2020-02-18
10:56:43.320548-05
 105 | Oracle Inc.      | 2020-02-18 10:56:43.321994-05 | 2020-02-18
10:56:43.321994-05
 106 | Spacewalk        | 2020-02-18 10:56:43.323291-05 | 2020-02-18
10:56:43.323291-05
 107 | EPEL             | 2020-02-18 10:56:43.324363-05 | 2020-02-18
10:56:43.324363-05
 108 | Novell Inc.      | 2020-02-18 10:56:43.325785-05 | 2020-02-18
10:56:43.325785-05
(9 rows)

On Thu, Mar 19, 2020 at 8:47 AM Ree, Jan-Albert van <j.a.v....@marin.nl>
wrote:

> Thanks a lot , the update works perfectly here as well
>
> I had 3 updates to make and now all is as it should be
>
> --
>
> Jan-Albert
>
>
>
> Jan-Albert van Ree | HPC Specialist | Digital Services
> MARIN | T +31 317 49 35 48 | j.a.v....@marin.nl | www.marin.nl
>
> [image: LinkedIn] <https://www.linkedin.com/company/marin> [image:
> YouTube] <http://www.youtube.com/marinmultimedia> [image: Twitter]
> <https://twitter.com/MARIN_nieuws> [image: Facebook]
> <https://www.facebook.com/marin.wageningen>
> MARIN news: Courses Hydrodynamics  Floating Offshore Structures & Ship
> design
> <https://www.marin.nl/courses-hydrodynamics-floating-offshore-structures-and-ship-design>
>
> ------------------------------
> *From:* spacewalk-list-boun...@redhat.com <
> spacewalk-list-boun...@redhat.com> on behalf of Eckert, Doug <
> doug.eck...@dowjones.com>
> *Sent:* Thursday, March 19, 2020 13:28
> *To:* spacewalk-list@redhat.com
> *Subject:* Re: [Spacewalk-list] Spacewalk 2.10 Released!
>
> I tried, but it wouldn't let me remove the record due to foreign key
> reference, so I updated the existing record instead with the value it
> would've used from the 'insert' command:
>
> rhnschema=# update rhnPackageKey set
> provider_id=lookup_package_provider('CentOS') where
> key_id='05b555b38483c65d';
> UPDATE 1
> rhnschema=# select * from rhnPackageKey where key_id='05b555b38483c65d';
>  id  |      key_id      | key_type_id | provider_id |            created
>          |           modified
>
> -----+------------------+-------------+-------------+-------------------------------+-------------------------------
>  157 | 05b555b38483c65d |         100 |         102 | 2020-02-21
> 09:06:55.782751-05 | 2020-03-19 08:26:56.268446-04
> (1 row)
>
> ​
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list



-- 
Doug Eckert
LEAD ENGINEER, COMPUTE
[image: NewsTech] <http://www.newscorp.com/>
M: +1.732.666.3681 <+1+555+555+5555>    O: +1.609.520.4993 <+1+555+555+5555>
E: doug.eck...@dowjones.com <cbergstres...@newscorp.com>
A: PO Box 300, Princeton, NJ 08543
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to