[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spacewalk-devel
Subject:    [Spacewalk-devel] IMPORTANT: Makefile.deps in schema dir
From:       mmccune () redhat ! com (Mike McCune)
Date:       2008-10-31 2:10:40
Message-ID: 490A6920.5030003 () redhat ! com
[Download RAW message or body]

If you go here:

spacewalk/schema/spacewalk/rhnsat/tables

you will see a file called:

Makefile.deps

For those of you making schema changes you need to be aware of this 
file.  This is how we control the order of the sql that gets run when we 
create our schema in Spacewalk.

Ever wondered how the SQL knew to create web_concact before it creates 
rhnServer (rhnServer references web_contact in a fk)?

Well, if you take a peek at Makefile.deps you will see how it works. 
Just add the dependency path next to the tables you add.

While trying to get the multiorg and cobbler table additions to run from 
scratch I noticed things weren't ordered correctly when they were 
getting created.  I added a few entries to the Makefiles.deps file:

--- a/schema/spacewalk/rhnsat/tables/Makefile.deps
+++ b/schema/spacewalk/rhnsat/tables/Makefile.deps
@@ -67,6 +67,8 @@ rhnChannelPackageArchCompat_data :: lookup_functions 
rhnChannelArch_data \
  rhnChannelPermission   :: rhnChannelPermissionRole rhnChannel web_contact
  rhnChannelRelationship :: rhnRelationshipType rhnChannel
+rhnChannelTrust         :: rhnChannel
+rhnChannel_triggers     :: rhnChannelTrust
  rhnClientCapability     :: rhnClientCapabilityName
  rhnClientOptionVersionMap :: rhnClientConfigOption rhnPackageEVR

you need to have rhnChannelTrust created *after* rhnChannel and 
likewise, the rhnChannel triggers need to get created after the tables 
are setup.

just a heads up!

-- 
Mike McCune
mmccune AT redhat.com
Engineering               | Portland, OR
RHN Satellite             | 650.567.9039x79248



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic