Thanks for your participation :)

Milan Zazrivec wrote:
On Wednesday 22 July 2009 01:11:17 Jeff Ortel wrote:
[..]
| 2 schema/spacewalk/common/tables/rhnSet.sql | 2 schema/spacewalk/common/tables/rhnSystemMigrations.sql
[...]
commit 79a08479f36399c26aae812fec749d0e9f38179c
Author: Jeff Ortel <[email protected]>
Date:   Tue Jul 21 16:01:15 2009 -0500

    Resolve differences between databases created master and pgsql sources.
[...]
diff --git a/schema/spacewalk/common/tables/rhnSet.sql
b/schema/spacewalk/common/tables/rhnSet.sql index 78105d0..87e8b83 100644
--- a/schema/spacewalk/common/tables/rhnSet.sql
+++ b/schema/spacewalk/common/tables/rhnSet.sql
@@ -21,7 +21,7 @@ CREATE TABLE rhnSet
                            REFERENCES web_contact (id)
                            ON DELETE CASCADE,
     label          VARCHAR2(32) NOT NULL,
-    element        NUMBER NOT NULL,
+    element        NUMBER,
     element_two    NUMBER,
     element_three  NUMBER,
     CONSTRAINT rhn_set_user_label_elem_unq UNIQUE (user_id, label,
element, element_two, element_three)

Are we sure this is correct? rhnSet table in current master branch does set
not null constraint on element column.

You're right. This is not correct. The usage of the ELEMENT oracle reserved word broke the upgrade script and I didn't catch it.

Corrected.


diff --git a/schema/spacewalk/common/tables/rhnSystemMigrations.sql
b/schema/spacewalk/common/tables/rhnSystemMigrations.sql index
b5c8d74..6d81a87 100644
--- a/schema/spacewalk/common/tables/rhnSystemMigrations.sql
+++ b/schema/spacewalk/common/tables/rhnSystemMigrations.sql
@@ -16,11 +16,11 @@

 CREATE TABLE rhnSystemMigrations
 (
-    org_id_to    NUMBER
+    org_id_to    NUMBER NOT NULL
                      CONSTRAINT rhn_sys_mig_oidto_fk
                          REFERENCES web_customer (id)
                          ON DELETE SET NULL,
-    org_id_from  NUMBER
+    org_id_from  NUMBER NOT NULL
                      CONSTRAINT rhn_sys_mig_oidfrm_fk
                          REFERENCES web_customer (id)
                          ON DELETE SET NULL,

I'm not sure about this change either. rhnSystemMigrations in master
branch does not set not null constraint for those two columns.

Right again.

Corrected.


-Milan

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to