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

List:       spacewalk-commits
Subject:    schema/spacewalk
From:       mzazrive () fedoraproject ! org (Milan Zazrivec)
Date:       2009-11-30 13:45:16
Message-ID: 20091130134516.D463A12015A () lists ! fedorahosted ! org
[Download RAW message or body]

 schema/spacewalk/common/tables/rhn_contact_group_members.sql                         \
|    6 +++---  schema/spacewalk/common/tables/rhn_ll_netsaint.sql                     \
|    2 +-  schema/spacewalk/common/tables/rhn_probe_param_value.sql                   \
|    4 ++--  schema/spacewalk/postgres/procs/rhn_prepare_install.sql                  \
|    2 +-  schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql \
|    8 --------  5 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit aee6131d9f6f2a9df2b5ed737e3fbaa04e8690eb
Author: Milan Zazrivec <mzazrivec at redhat.com>
Date:   Mon Nov 30 14:12:59 2009 +0100

    Revert "Fix numeric/smallint incompatible types in PostgreSQL."
    
    This reverts commit 9bfcee416f62ec342d249c51b8edc64d57b67ef6.
    
    There are two reasons for the revert:
    
    1) the schema upgrade script won't work. Oracle will throw
    "ORA-01440: column to be modified must be empty to decrease precision or scale"
    in most of the upgrade situations (i.e. with filled tables)
    
    2) it would be more desirable to change the type of referenced columns
    from NUMBER(12) to NUMBER to stay consistent. The upgrade script modifying
    NUMBER(12) to NUMBER would work without any problems then.
    
    There's bug #542662 tracking efforts leading to an alternative
    solution for the problem addressed by the original commit.

diff --git a/schema/spacewalk/common/tables/rhn_contact_group_members.sql \
b/schema/spacewalk/common/tables/rhn_contact_group_members.sql index 952265b..25b67aa \
                100644
--- a/schema/spacewalk/common/tables/rhn_contact_group_members.sql
+++ b/schema/spacewalk/common/tables/rhn_contact_group_members.sql
@@ -16,16 +16,16 @@
 
 CREATE TABLE rhn_contact_group_members
 (
-    contact_group_id          NUMBER(12) NOT NULL
+    contact_group_id          NUMBER NOT NULL
                                   CONSTRAINT rhn_cntgm_cgid_fk
                                       REFERENCES rhn_contact_groups (recid)
                                       ON DELETE CASCADE,
     order_number              NUMBER NOT NULL,
-    member_contact_method_id  NUMBER(12)
+    member_contact_method_id  NUMBER
                                   CONSTRAINT rhn_cntgm_mcmid_fk
                                       REFERENCES rhn_contact_methods (recid)
                                       ON DELETE CASCADE,
-    member_contact_group_id   NUMBER(12)
+    member_contact_group_id   NUMBER
                                   CONSTRAINT rhn_cntgm_mcgid_fk
                                       REFERENCES rhn_contact_groups (recid)
                                       ON DELETE CASCADE,
diff --git a/schema/spacewalk/common/tables/rhn_ll_netsaint.sql \
b/schema/spacewalk/common/tables/rhn_ll_netsaint.sql index eda6c67..eaf4553 100644
--- a/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
+++ b/schema/spacewalk/common/tables/rhn_ll_netsaint.sql
@@ -16,7 +16,7 @@
 
 CREATE TABLE rhn_ll_netsaint
 (
-    netsaint_id  NUMBER(12) NOT NULL,
+    netsaint_id  NUMBER NOT NULL,
     city         VARCHAR2(255)
 )
 ENABLE ROW MOVEMENT
diff --git a/schema/spacewalk/common/tables/rhn_probe_param_value.sql \
b/schema/spacewalk/common/tables/rhn_probe_param_value.sql index ded05e1..e2f606b \
                100644
--- a/schema/spacewalk/common/tables/rhn_probe_param_value.sql
+++ b/schema/spacewalk/common/tables/rhn_probe_param_value.sql
@@ -16,8 +16,8 @@
 
 CREATE TABLE rhn_probe_param_value
 (
-    probe_id          NUMBER(12) NOT NULL,
-    command_id        NUMBER(12) NOT NULL,
+    probe_id          NUMBER NOT NULL,
+    command_id        NUMBER NOT NULL,
     param_name        VARCHAR2(40) NOT NULL,
     value             VARCHAR2(1024),
     last_update_user  VARCHAR2(40),
diff --git a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql \
b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql index 5ebb34b..05e51a6 \
                100644
--- a/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
+++ b/schema/spacewalk/postgres/procs/rhn_prepare_install.sql
@@ -26,7 +26,7 @@ rhn_prepare_install
     command_instance_id in out rhn_command_queue_instances.recid%type,
     install_command     in rhn_command_queue_instances.command_id%type
 )
-returns smallint
+returns numeric
 as $$
 declare
     /* ignore this command if it has not been run after five minutes */
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql \
b/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
 deleted file mode 100644
index c5ec175..0000000
--- a/schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/001-numeric-12-columns.sql
                
+++ /dev/null
@@ -1,8 +0,0 @@
--- Change columns to numeric 12 to match the columns of their foreign keys.
-alter table rhn_contact_group_members modify(contact_group_id NUMBER(12));
-alter table rhn_contact_group_members modify(member_contact_method_id NUMBER(12));
-alter table rhn_contact_group_members modify(member_contact_group_id NUMBER(12));
-alter table rhn_ll_netsaint modify(netsaint_id NUMBER(12));
-alter table rhn_probe_param_value modify(probe_id NUMBER(12));
-alter table rhn_probe_param_value modify(command_id NUMBER(12));
-


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

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