schema/spacewalk/common/Makefile
| 4 -
schema/spacewalk/common/tables/PXTSessions.sql
| 9 +--
schema/spacewalk/common/tables/rhnChannelPermissionRole.sql
| 7 --
schema/spacewalk/common/tables/rhnConfigFileName.sql
| 7 --
schema/spacewalk/common/tables/rhnKickstartableTree.sql
| 7 --
schema/spacewalk/common/tables/rhnOrgErrataCacheQueue.sql
| 8 ---
schema/spacewalk/common/tables/rhnSet.sql
| 4 -
schema/spacewalk/common/tables/rhn_command.sql
| 7 --
schema/spacewalk/common/tables/rhn_command_param_threshold.sql
| 7 --
schema/spacewalk/common/tables/rhn_command_queue_execs.sql
| 3 -
schema/spacewalk/common/tables/rhn_command_queue_params.sql
| 7 --
schema/spacewalk/common/tables/rhn_config_macro.sql
| 7 --
schema/spacewalk/common/tables/rhn_config_parameter.sql
| 7 --
schema/spacewalk/common/tables/rhn_current_state_summaries.sql
| 7 --
schema/spacewalk/common/tables/rhn_os_commands_xref.sql
| 7 --
schema/spacewalk/common/tables/rhn_probe.sql
| 7 --
schema/spacewalk/common/tables/rhn_probe_param_value.sql
| 7 --
schema/spacewalk/common/tables/rhn_redirect_email_targets.sql
| 7 --
schema/spacewalk/common/tables/rhn_redirect_group_targets.sql
| 7 --
schema/spacewalk/common/tables/rhn_redirect_method_targets.sql
| 7 --
schema/spacewalk/common/tables/rhn_service_probe_origins.sql
| 11 ----
schema/spacewalk/common/tables/rhn_time_zone_names.sql
| 7 --
schema/spacewalk/postgres/tables/Makefile
| 2
schema/spacewalk/spacewalk-oracle2postgresql
| 25 +++++++++
schema/spacewalk/spacewalk-schema.spec
| 1
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
| 5 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
| 5 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
| 11 ++++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
| 9 +++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
| 26 ++++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
| 15 +++++
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.postgresql
| 2
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
| 4 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.oracle
| 3 +
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.postgresql
| 2
63 files changed, 218 insertions(+), 111 deletions(-)
New commits:
commit 4d0ca6e75ab54a1a5c786b401e94883be99a043a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 23:56:33 2011 +0200
fixed rhn_command upgrade for schema <0.6
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
index 6ba9aef..bbab947 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
@@ -2,9 +2,24 @@ alter table rhn_command_param_threshold disable constraint
rhn_coptr_cmd_id_cmd_
alter table rhn_command_parameter disable constraint rhn_cparm_cmd_command_id_fk;
alter table rhn_os_commands_xref disable constraint rhn_oscxr_cmmnd_commands_id_fk;
alter table rhn_probe disable constraint rhn_probe_cmmnd_command_id_fk;
+
+-- in spacewalk <0.6 constraint RHN_CMMND_RECID_COMM_CL_UQ had been
+-- miscalled RHN_CMMND_NAME_UQ
+declare
+ cname varchar2(30);
+begin
+ select constraint_name into cname
+ from user_constraints
+ where table_name = 'RHN_COMMAND' and index_name =
'RHN_CMMND_RECID_COMM_CL_UQ';
+ if cname = 'RHN_CMMND_NAME_UQ' then
+ execute immediate 'alter table rhn_command rename constraint
RHN_CMMND_NAME_UQ to RHN_CMMND_RECID_COMM_CL_UQ';
+ end if;
+end;
+/
alter table rhn_command disable constraint rhn_cmmnd_recid_comm_cl_uq;
drop index rhn_cmmnd_recid_comm_cl_uq;
alter table rhn_command enable constraint rhn_cmmnd_recid_comm_cl_uq;
+
alter table rhn_command_param_threshold enable constraint rhn_coptr_cmd_id_cmd_cl_fk;
alter table rhn_command_parameter enable constraint rhn_cparm_cmd_command_id_fk;
alter table rhn_os_commands_xref enable constraint rhn_oscxr_cmmnd_commands_id_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
index a1d5b8b..f20ce63 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 aeeee3b6259c987ee806dc6e1c92c2ca66b7b0cc
+-- oracle equivalent source sha1 94431cf74017e4e81d36482b611d0f7dddd2befe
-- This file is intentionally left empty.
commit 3f70482722be67c36d3b74740f8d84259ee04444
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 23:21:08 2011 +0200
upgrade script for rhn_service_probe_origins
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
index 19f7ae3..add2e21 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
@@ -1,3 +1,4 @@
alter table rhn_service_probe_origins disable constraint rhn_srvpo_serv_pr_id_orig_uq;
drop index rhn_srvpo_serv_pr_id_orig_uq;
+drop index rhn_srvpo_serv_orig_pr_id_uq;
alter table rhn_service_probe_origins enable constraint rhn_srvpo_serv_pr_id_orig_uq;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
index c90cf1c..6715d17 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
@@ -1,2 +1,3 @@
--- oracle equivalent source sha1 688c5406cae5e30a193b7d9c84f4bf9140737293
--- This file is intentionally left empty.
+-- oracle equivalent source sha1 d71817560dcb985a2576c717c201e76500adc694
+
+drop index rhn_srvpo_serv_orig_pr_id_uq;
commit b11a7994bac3cbd61e16ddea7bac1d03eced8d6c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 23:16:55 2011 +0200
having unique both on (a, b) and (b, a) isn't very useful
diff --git a/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
b/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
index eea275a..322be34 100644
--- a/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
+++ b/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
@@ -26,10 +26,6 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_service_probe_origins IS 'srvpo mapping from a replicated
service probe to the check suite probe it was copied from. uq instead of pk because need
to set origin_probe_id to null!!!';
-CREATE UNIQUE INDEX rhn_srvpo_serv_orig_pr_id_uq
- ON rhn_service_probe_origins (origin_probe_id, service_probe_id)
- TABLESPACE [[8m_tbs]];
-
ALTER TABLE rhn_service_probe_origins
ADD CONSTRAINT rhn_srvpo_serv_pr_id_orig_uq UNIQUE (service_probe_id,
origin_probe_id)
USING INDEX TABLESPACE [[8m_tbs]];
commit 2a6f5c1356e44ec8f6f24901daf225af0f6811a1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys for rhn_probe_recid_probe_type_uq first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
index e20d049..1b0edea 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
@@ -1,3 +1,15 @@
+alter table rhn_check_probe disable constraint rhn_chkpb_recid_probe_typ_fk;
+alter table rhn_host_probe disable constraint rhn_hstpb_probe_probe_id_fk;
+alter table rhn_probe_param_value disable constraint rhn_ppval_chkpb_probe_id_fk;
+alter table rhn_sat_cluster_probe disable constraint rhn_sclpb_prb_recid_prb_typ_fk;
+alter table rhn_service_probe_origins disable constraint rhn_srvpo_pr_serv_pr_fk;
+alter table rhn_url_probe disable constraint rhn_urlpb_probe_pr_id_pr_fk;
alter table rhn_probe disable constraint rhn_probe_recid_probe_type_uq;
drop index rhn_probe_recid_probe_type_uq;
alter table rhn_probe enable constraint rhn_probe_recid_probe_type_uq;
+alter table rhn_check_probe enable constraint rhn_chkpb_recid_probe_typ_fk;
+alter table rhn_host_probe enable constraint rhn_hstpb_probe_probe_id_fk;
+alter table rhn_probe_param_value enable constraint rhn_ppval_chkpb_probe_id_fk;
+alter table rhn_sat_cluster_probe enable constraint rhn_sclpb_prb_recid_prb_typ_fk;
+alter table rhn_service_probe_origins enable constraint rhn_srvpo_pr_serv_pr_fk;
+alter table rhn_url_probe enable constraint rhn_urlpb_probe_pr_id_pr_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
index cf34e3b..27c986a 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 3d672a870b56bcd6665c01dd0e433b39536e0a9c
+-- oracle equivalent source sha1 90551ec827f00ad7fb158a850bbc000d65c9d512
-- This file is intentionally left empty.
commit 2438242c9d849779b7aeed0aab8e9952cf2c8443
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys for rhn_cmmnd_recid_comm_cl_uq first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
index ca5eb65..6ba9aef 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
@@ -1,3 +1,11 @@
+alter table rhn_command_param_threshold disable constraint rhn_coptr_cmd_id_cmd_cl_fk;
+alter table rhn_command_parameter disable constraint rhn_cparm_cmd_command_id_fk;
+alter table rhn_os_commands_xref disable constraint rhn_oscxr_cmmnd_commands_id_fk;
+alter table rhn_probe disable constraint rhn_probe_cmmnd_command_id_fk;
alter table rhn_command disable constraint rhn_cmmnd_recid_comm_cl_uq;
drop index rhn_cmmnd_recid_comm_cl_uq;
alter table rhn_command enable constraint rhn_cmmnd_recid_comm_cl_uq;
+alter table rhn_command_param_threshold enable constraint rhn_coptr_cmd_id_cmd_cl_fk;
+alter table rhn_command_parameter enable constraint rhn_cparm_cmd_command_id_fk;
+alter table rhn_os_commands_xref enable constraint rhn_oscxr_cmmnd_commands_id_fk;
+alter table rhn_probe enable constraint rhn_probe_cmmnd_command_id_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
index 5af3b90..a1d5b8b 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 c251e5a5a6cece16c73eeccb4a3fd7f5ea0b77e4
+-- oracle equivalent source sha1 aeeee3b6259c987ee806dc6e1c92c2ca66b7b0cc
-- This file is intentionally left empty.
commit bb618b888f6f2cd1b303d4d65aae77821f371da5
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys for rhn_kstree_id_pk first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
index 030a9c6..6a2221c 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
@@ -1,3 +1,9 @@
+alter table rhnKSTreeFile disable constraint rhn_kstreefile_kid_fk;
+alter table rhnKickstartDefaults disable constraint rhn_ksd_kstid_fk;
+alter table rhnKickstartSession disable constraint rhn_ks_session_kstid_fk;
alter table rhnKickstartableTree disable constraint rhn_kstree_id_pk;
drop index rhn_kstree_id_pk;
alter table rhnKickstartableTree enable constraint rhn_kstree_id_pk;
+alter table rhnKSTreeFile enable constraint rhn_kstreefile_kid_fk;
+alter table rhnKickstartDefaults enable constraint rhn_ksd_kstid_fk;
+alter table rhnKickstartSession enable constraint rhn_ks_session_kstid_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
index 8a83b1c..f78c0ae 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 a1a4ad1ce8a6d702c8950d53c87856c0b5076aee
+-- oracle equivalent source sha1 5d2c0a68498ba25edfc3628dddc66ae17b5150d5
-- This file is intentionally left empty.
commit 538439098b7ee10aa69d546c384af383d21de35c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys for rhn_cfname_id_pk first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
index e1ff1c0..d25ef6e 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
@@ -1,3 +1,11 @@
+alter table rhnActionConfigFileName disable constraint rhn_actioncf_name_cfnid_fk;
+alter table rhnConfigFile disable constraint rhn_conffile_cfnid_fk;
+alter table rhnConfigInfo disable constraint rhn_confinfo_symlink_fk;
+alter table rhnFileListMembers disable constraint rhn_flmembers_cfnid_fk;
alter table rhnConfigFileName disable constraint rhn_cfname_id_pk;
drop index rhn_cfname_id_pk;
alter table rhnConfigFileName enable constraint rhn_cfname_id_pk;
+alter table rhnActionConfigFileName enable constraint rhn_actioncf_name_cfnid_fk;
+alter table rhnConfigFile enable constraint rhn_conffile_cfnid_fk;
+alter table rhnConfigInfo enable constraint rhn_confinfo_symlink_fk;
+alter table rhnFileListMembers enable constraint rhn_flmembers_cfnid_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
index 3f673f8..516df7f 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 bc85d83d30a3439727959e671dc5013d1f99afa0
+-- oracle equivalent source sha1 d5f56944acb90d0ed069ec721fe9b8f08d072bd9
-- This file is intentionally left empty.
commit ca386f7c21403b600dd757ccdb15a3c955cb228e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys for rhn_cperm_role_id_pk first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
index 465ae24..80b2c10 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
@@ -1,3 +1,5 @@
+alter table rhnChannelPermission disable constraint rhn_cperm_rid_fk;
alter table rhnChannelPermissionRole disable constraint rhn_cperm_role_id_pk;
drop index rhn_cperm_role_id_pk;
alter table rhnChannelPermissionRole enable constraint rhn_cperm_role_id_pk;
+alter table rhnChannelPermission enable constraint rhn_cperm_rid_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
index 4c3139b..63cfecb 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 c22f3fbdfc087e33b8fbfa940b1621dbaf24739d
+-- oracle equivalent source sha1 695851bdda947082df18b471346262f5e91a30db
-- This file is intentionally left empty.
commit aa4c5fb1ee1beb00c842e77ff0f1bf1a4490391a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 14:21:04 2011 +0200
disable foreign keys first
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
index d736dd1..139f3fb 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
@@ -1,3 +1,5 @@
+alter table rhnVisibleObjects disable constraint rhn_vis_objs_sess_fk;
alter table PXTSessions disable constraint pxt_sessions_pk;
drop index pxt_sessions_pk;
alter table PXTSessions enable constraint pxt_sessions_pk;
+alter table rhnVisibleObjects enable constraint rhn_vis_objs_sess_fk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
index c723916..79b6c2b 100644
---
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 4cfae5df48c7c5321672e2a73ec9a63e0d298826
+-- oracle equivalent source sha1 de7b107726f9527b9c1531a581cc59f14d4748c9
-- This file is intentionally left empty.
commit 1880dbb1e56a458efc8817065c3cffeab21edd07
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 10:07:34 2011 +0200
upgrade scripts for create contraint and its index at once
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
new file mode 100644
index 0000000..d736dd1
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table PXTSessions disable constraint pxt_sessions_pk;
+drop index pxt_sessions_pk;
+alter table PXTSessions enable constraint pxt_sessions_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
new file mode 100644
index 0000000..c723916
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/007-PXTSessions-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 4cfae5df48c7c5321672e2a73ec9a63e0d298826
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
new file mode 100644
index 0000000..465ae24
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhnChannelPermissionRole disable constraint rhn_cperm_role_id_pk;
+drop index rhn_cperm_role_id_pk;
+alter table rhnChannelPermissionRole enable constraint rhn_cperm_role_id_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
new file mode 100644
index 0000000..4c3139b
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/008-rhnChannelPermissionRole-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 c22f3fbdfc087e33b8fbfa940b1621dbaf24739d
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
new file mode 100644
index 0000000..e1ff1c0
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhnConfigFileName disable constraint rhn_cfname_id_pk;
+drop index rhn_cfname_id_pk;
+alter table rhnConfigFileName enable constraint rhn_cfname_id_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
new file mode 100644
index 0000000..3f673f8
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/009-rhnConfigFileName-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 bc85d83d30a3439727959e671dc5013d1f99afa0
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
new file mode 100644
index 0000000..030a9c6
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhnKickstartableTree disable constraint rhn_kstree_id_pk;
+drop index rhn_kstree_id_pk;
+alter table rhnKickstartableTree enable constraint rhn_kstree_id_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
new file mode 100644
index 0000000..8a83b1c
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/010-rhnKickstartableTree-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 a1a4ad1ce8a6d702c8950d53c87856c0b5076aee
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
new file mode 100644
index 0000000..ca5eb65
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_command disable constraint rhn_cmmnd_recid_comm_cl_uq;
+drop index rhn_cmmnd_recid_comm_cl_uq;
+alter table rhn_command enable constraint rhn_cmmnd_recid_comm_cl_uq;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
new file mode 100644
index 0000000..5af3b90
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/011-rhn_command-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 c251e5a5a6cece16c73eeccb4a3fd7f5ea0b77e4
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.oracle
new file mode 100644
index 0000000..36b16e8
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_command_param_threshold disable constraint
rhn_coptr_id_p_name_p_type_pk;
+drop index rhn_coptr_id_p_name_p_type_pk;
+alter table rhn_command_param_threshold enable constraint rhn_coptr_id_p_name_p_type_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.postgresql
new file mode 100644
index 0000000..50dbdd4
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/012-rhn_command_param_threshold-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 15e74d890cae38b5bfc90375f44aed54eaec9511
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.oracle
new file mode 100644
index 0000000..ab20a0d
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_command_queue_execs disable constraint rhn_cqexe_inst_id_nsaint_pk;
+drop index rhn_cqexe_inst_id_nsaint_pk;
+alter table rhn_command_queue_execs enable constraint rhn_cqexe_inst_id_nsaint_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.postgresql
new file mode 100644
index 0000000..f1b6b0d
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/013-rhn_command_queue_execs-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 dce9fdf78020297a35382f384a0ca9a8bd4e7054
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.oracle
new file mode 100644
index 0000000..44794e6
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_command_queue_params disable constraint rhn_cqprm_instance_id_ord_pk;
+drop index rhn_cqprm_instance_id_ord_pk;
+alter table rhn_command_queue_params enable constraint rhn_cqprm_instance_id_ord_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.postgresql
new file mode 100644
index 0000000..adc8464
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/014-rhn_command_queue_params-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 45f122d4ae05bee4c88a7341ead1792a42e8c87e
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.oracle
new file mode 100644
index 0000000..c5347c9
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_config_macro disable constraint rhn_confm_name_pk;
+drop index rhn_confm_name_pk;
+alter table rhn_config_macro enable constraint rhn_confm_name_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.postgresql
new file mode 100644
index 0000000..33f8555
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/015-rhn_config_macro-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 04041e64de4fbee91d0186ac92260f7746e5a280
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.oracle
new file mode 100644
index 0000000..610a66e
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_config_parameter disable constraint rhn_confp_group_name_name_pk;
+drop index rhn_confp_group_name_name_pk;
+alter table rhn_config_parameter enable constraint rhn_confp_group_name_name_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.postgresql
new file mode 100644
index 0000000..f57b70a
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/016-rhn_config_parameter-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 d748834962b631f4c570a3a0749b73b659ed1448
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.oracle
new file mode 100644
index 0000000..d1b7306
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_current_state_summaries disable constraint
rhn_current_state_summaries_pk;
+drop index rhn_current_state_summaries_pk;
+alter table rhn_current_state_summaries enable constraint
rhn_current_state_summaries_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.postgresql
new file mode 100644
index 0000000..c3daee2
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/017-rhn_current_state_summaries-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 49cb0c49b56f57c408fa7d798cc6c3cfb00c41ef
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.oracle
new file mode 100644
index 0000000..edd6ca6
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_os_commands_xref disable constraint rhn_oscxr_os_id_commands_id_pk;
+drop index rhn_oscxr_os_id_commands_id_pk;
+alter table rhn_os_commands_xref enable constraint rhn_oscxr_os_id_commands_id_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.postgresql
new file mode 100644
index 0000000..685f535
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/018-rhn_os_commands_xref-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 8939e7d7e4ac530264010f95ba35ab13f315e84f
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
new file mode 100644
index 0000000..e20d049
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_probe disable constraint rhn_probe_recid_probe_type_uq;
+drop index rhn_probe_recid_probe_type_uq;
+alter table rhn_probe enable constraint rhn_probe_recid_probe_type_uq;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
new file mode 100644
index 0000000..cf34e3b
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/019-rhn_probe-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 3d672a870b56bcd6665c01dd0e433b39536e0a9c
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.oracle
new file mode 100644
index 0000000..f4f3ec6
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_probe_param_value disable constraint rhn_ppval_p_id_cmd_id_parm_pk;
+drop index rhn_ppval_p_id_cmd_id_parm_pk;
+alter table rhn_probe_param_value enable constraint rhn_ppval_p_id_cmd_id_parm_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.postgresql
new file mode 100644
index 0000000..b235bd8
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/020-rhn_probe_param_value-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 133b7cdaf4813d49bc7837e9671e02c1a67f6fb9
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.oracle
new file mode 100644
index 0000000..e2c5dd8
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_redirect_email_targets disable constraint rhn_rdret_pk;
+drop index rhn_rdret_pk;
+alter table rhn_redirect_email_targets enable constraint rhn_rdret_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.postgresql
new file mode 100644
index 0000000..3d07f5c
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/021-rhn_redirect_email_targets-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 89d15e5a7914a3a7fe9dfa60cd927e07d5086060
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.oracle
new file mode 100644
index 0000000..9d56d32
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_redirect_group_targets disable constraint rhn_rdrgt_pk;
+drop index rhn_rdrgt_pk;
+alter table rhn_redirect_group_targets enable constraint rhn_rdrgt_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.postgresql
new file mode 100644
index 0000000..63409d7
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/022-rhn_redirect_group_targets-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 3395f6e53750da9d64bd6175b8f2e76de88db650
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.oracle
new file mode 100644
index 0000000..3141bc1
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_redirect_method_targets disable constraint rhn_rdrme_pk;
+drop index rhn_rdrme_pk;
+alter table rhn_redirect_method_targets enable constraint rhn_rdrme_pk;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.postgresql
new file mode 100644
index 0000000..c3615b9
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/023-rhn_redirect_method_targets-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 67af8c11cea355b93b4a1c53884659c463c81211
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
new file mode 100644
index 0000000..19f7ae3
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_service_probe_origins disable constraint rhn_srvpo_serv_pr_id_orig_uq;
+drop index rhn_srvpo_serv_pr_id_orig_uq;
+alter table rhn_service_probe_origins enable constraint rhn_srvpo_serv_pr_id_orig_uq;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
new file mode 100644
index 0000000..c90cf1c
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/024-rhn_service_probe_origins-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 688c5406cae5e30a193b7d9c84f4bf9140737293
+-- This file is intentionally left empty.
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.oracle
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.oracle
new file mode 100644
index 0000000..6c39ea7
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.oracle
@@ -0,0 +1,3 @@
+alter table rhn_time_zone_names disable constraint rhn_time_zone_names_uq;
+drop index rhn_time_zone_names_uq;
+alter table rhn_time_zone_names enable constraint rhn_time_zone_names_uq;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.postgresql
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.postgresql
new file mode 100644
index 0000000..aa1f408
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/025-rhn_time_zone_names-pk.sql.postgresql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 f5bba0b27e470e34682d884eb2042a6947495d63
+-- This file is intentionally left empty.
commit 95ee2a935fac081f79103994f6c5958cb9b19380
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 26 17:07:59 2011 +0200
create contraint and its index at once
creating index and constraint separately makes transformation to
postgresql fail
diff --git a/schema/spacewalk/common/tables/PXTSessions.sql
b/schema/spacewalk/common/tables/PXTSessions.sql
index 7378aa7..00ec0aa 100644
--- a/schema/spacewalk/common/tables/PXTSessions.sql
+++ b/schema/spacewalk/common/tables/PXTSessions.sql
@@ -29,11 +29,6 @@ ENABLE ROW MOVEMENT
LOGGING
;
-CREATE UNIQUE INDEX pxt_sessions_pk
- ON PXTSessions (id)
- TABLESPACE [[8m_tbs]]
- NOLOGGING;
-
CREATE INDEX PXTSessions_user
ON PXTSessions (web_user_id)
TABLESPACE [[4m_tbs]]
@@ -47,5 +42,7 @@ CREATE INDEX PXTSessions_expires
CREATE SEQUENCE pxt_id_seq;
ALTER TABLE PXTSessions
- ADD CONSTRAINT pxt_sessions_pk PRIMARY KEY (id);
+ ADD CONSTRAINT pxt_sessions_pk PRIMARY KEY (id)
+ USING INDEX TABLESPACE [[8m_tbs]]
+ NOLOGGING;
diff --git a/schema/spacewalk/common/tables/rhnChannelPermissionRole.sql
b/schema/spacewalk/common/tables/rhnChannelPermissionRole.sql
index 9b32fb2..a089411 100644
--- a/schema/spacewalk/common/tables/rhnChannelPermissionRole.sql
+++ b/schema/spacewalk/common/tables/rhnChannelPermissionRole.sql
@@ -27,10 +27,6 @@ CREATE TABLE rhnChannelPermissionRole
ENABLE ROW MOVEMENT
;
-CREATE INDEX rhn_cperm_role_id_pk
- ON rhnChannelPermissionRole (id)
- TABLESPACE [[64k_tbs]];
-
CREATE INDEX rhn_cperm_role_label_id_idx
ON rhnChannelPermissionRole (label, id)
TABLESPACE [[64k_tbs]];
@@ -38,7 +34,8 @@ CREATE INDEX rhn_cperm_role_label_id_idx
CREATE SEQUENCE rhn_cperm_role_id_seq;
ALTER TABLE rhnChannelPermissionRole
- ADD CONSTRAINT rhn_cperm_role_id_pk PRIMARY KEY (id);
+ ADD CONSTRAINT rhn_cperm_role_id_pk PRIMARY KEY (id)
+ USING INDEX TABLESPACE [[64k_tbs]];
ALTER TABLE rhnChannelPermissionRole
ADD CONSTRAINT rhn_cperm_role_label_uq UNIQUE (label);
diff --git a/schema/spacewalk/common/tables/rhnConfigFileName.sql
b/schema/spacewalk/common/tables/rhnConfigFileName.sql
index 0729c61..eaa4cf0 100644
--- a/schema/spacewalk/common/tables/rhnConfigFileName.sql
+++ b/schema/spacewalk/common/tables/rhnConfigFileName.sql
@@ -26,10 +26,6 @@ CREATE TABLE rhnConfigFileName
ENABLE ROW MOVEMENT
;
-CREATE INDEX rhn_cfname_id_pk
- ON rhnConfigFileName (id)
- TABLESPACE [[2m_tbs]];
-
CREATE UNIQUE INDEX rhn_cfname_path_uq
ON rhnConfigFileName (path)
TABLESPACE [[4m_tbs]];
@@ -37,5 +33,6 @@ CREATE UNIQUE INDEX rhn_cfname_path_uq
CREATE SEQUENCE rhn_cfname_id_seq;
ALTER TABLE rhnConfigFileName
- ADD CONSTRAINT rhn_cfname_id_pk PRIMARY KEY (id);
+ ADD CONSTRAINT rhn_cfname_id_pk PRIMARY KEY (id)
+ USING INDEX TABLESPACE [[2m_tbs]];
diff --git a/schema/spacewalk/common/tables/rhnKickstartableTree.sql
b/schema/spacewalk/common/tables/rhnKickstartableTree.sql
index 27cf5ca..635780e 100644
--- a/schema/spacewalk/common/tables/rhnKickstartableTree.sql
+++ b/schema/spacewalk/common/tables/rhnKickstartableTree.sql
@@ -46,10 +46,6 @@ CREATE TABLE rhnKickstartableTree
ENABLE ROW MOVEMENT
;
-CREATE INDEX rhn_kstree_id_pk
- ON rhnKickstartableTree (id)
- TABLESPACE [[4m_tbs]];
-
CREATE UNIQUE INDEX rhn_kstree_oid_label_uq
ON rhnKickstartableTree (org_id, label)
TABLESPACE [[8m_tbs]];
@@ -57,5 +53,6 @@ CREATE UNIQUE INDEX rhn_kstree_oid_label_uq
CREATE SEQUENCE rhn_kstree_id_seq;
ALTER TABLE rhnKickstartableTree
- ADD CONSTRAINT rhn_kstree_id_pk PRIMARY KEY (id);
+ ADD CONSTRAINT rhn_kstree_id_pk PRIMARY KEY (id)
+ USING INDEX TABLESPACE [[4m_tbs]];
diff --git a/schema/spacewalk/common/tables/rhn_command.sql
b/schema/spacewalk/common/tables/rhn_command.sql
index ec32bc8..b0767f0 100644
--- a/schema/spacewalk/common/tables/rhn_command.sql
+++ b/schema/spacewalk/common/tables/rhn_command.sql
@@ -51,14 +51,11 @@ CREATE UNIQUE INDEX rhn_cmmnd_name_uq
ON rhn_command (name)
TABLESPACE [[2m_tbs]];
-CREATE UNIQUE INDEX rhn_cmmnd_recid_comm_cl_uq
- ON rhn_command (recid, command_class)
- TABLESPACE [[2m_tbs]];
-
CREATE SEQUENCE rhn_commands_recid_seq START WITH 305;
ALTER TABLE rhn_command
- ADD CONSTRAINT rhn_cmmnd_recid_comm_cl_uq UNIQUE (recid, command_class);
+ ADD CONSTRAINT rhn_cmmnd_recid_comm_cl_uq UNIQUE (recid, command_class)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_command
ADD CONSTRAINT rhn_cmmnd_cmdgr_group_name_fk FOREIGN KEY (group_name)
diff --git a/schema/spacewalk/common/tables/rhn_command_param_threshold.sql
b/schema/spacewalk/common/tables/rhn_command_param_threshold.sql
index 463e8f5..d78d069 100644
--- a/schema/spacewalk/common/tables/rhn_command_param_threshold.sql
+++ b/schema/spacewalk/common/tables/rhn_command_param_threshold.sql
@@ -32,12 +32,9 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_command_param_threshold IS 'coptr a parameter for a particular
command';
-CREATE UNIQUE INDEX rhn_coptr_id_p_name_p_type_pk
- ON rhn_command_param_threshold (command_id, param_name, param_type)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_command_param_threshold
- ADD CONSTRAINT rhn_coptr_id_p_name_p_type_pk PRIMARY KEY (command_id, param_name,
param_type);
+ ADD CONSTRAINT rhn_coptr_id_p_name_p_type_pk PRIMARY KEY (command_id, param_name,
param_type)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_command_param_threshold
ADD CONSTRAINT rhn_coptr_cmd_id_cmd_cl_fk FOREIGN KEY (command_id, command_class)
diff --git a/schema/spacewalk/common/tables/rhn_command_queue_execs.sql
b/schema/spacewalk/common/tables/rhn_command_queue_execs.sql
index 8eb1d38..6052acb 100644
--- a/schema/spacewalk/common/tables/rhn_command_queue_execs.sql
+++ b/schema/spacewalk/common/tables/rhn_command_queue_execs.sql
@@ -32,9 +32,6 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_command_queue_execs IS 'cqexe command queue execution
records';
-CREATE UNIQUE INDEX rhn_cqexe_inst_id_nsaint_pk
- ON rhn_command_queue_execs (instance_id, netsaint_id);
-
CREATE INDEX rhn_command_queue_netsaint_idx
ON rhn_command_queue_execs (netsaint_id)
TABLESPACE [[8m_tbs]];
diff --git a/schema/spacewalk/common/tables/rhn_command_queue_params.sql
b/schema/spacewalk/common/tables/rhn_command_queue_params.sql
index 84d0215..71a91f7 100644
--- a/schema/spacewalk/common/tables/rhn_command_queue_params.sql
+++ b/schema/spacewalk/common/tables/rhn_command_queue_params.sql
@@ -25,12 +25,9 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_command_queue_params IS 'cqprm command queue parameter
definitions';
-CREATE UNIQUE INDEX rhn_cqprm_instance_id_ord_pk
- ON rhn_command_queue_params (instance_id, ord)
- TABLESPACE [[4m_tbs]];
-
ALTER TABLE rhn_command_queue_params
- ADD CONSTRAINT rhn_cqprm_instance_id_ord_pk PRIMARY KEY (instance_id, ord);
+ ADD CONSTRAINT rhn_cqprm_instance_id_ord_pk PRIMARY KEY (instance_id, ord)
+ USING INDEX TABLESPACE [[4m_tbs]];
ALTER TABLE rhn_command_queue_params
ADD CONSTRAINT rhn_cqprm_cqins_instance_id_fk FOREIGN KEY (instance_id)
diff --git a/schema/spacewalk/common/tables/rhn_config_macro.sql
b/schema/spacewalk/common/tables/rhn_config_macro.sql
index 74f8c82..e7c2c47 100644
--- a/schema/spacewalk/common/tables/rhn_config_macro.sql
+++ b/schema/spacewalk/common/tables/rhn_config_macro.sql
@@ -29,11 +29,8 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_config_macro IS 'confm configuration macro def';
-CREATE UNIQUE INDEX rhn_confm_name_pk
- ON rhn_config_macro (name)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_config_macro
- ADD CONSTRAINT rhn_confm_name_pk PRIMARY KEY (name);
+ ADD CONSTRAINT rhn_confm_name_pk PRIMARY KEY (name)
+ USING INDEX TABLESPACE [[2m_tbs]];
diff --git a/schema/spacewalk/common/tables/rhn_config_parameter.sql
b/schema/spacewalk/common/tables/rhn_config_parameter.sql
index e31abe8..27a886a 100644
--- a/schema/spacewalk/common/tables/rhn_config_parameter.sql
+++ b/schema/spacewalk/common/tables/rhn_config_parameter.sql
@@ -28,12 +28,9 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_config_parameter IS 'confp configuration parameter
definition';
-CREATE UNIQUE INDEX rhn_confp_group_name_name_pk
- ON rhn_config_parameter (group_name, name)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_config_parameter
- ADD CONSTRAINT rhn_confp_group_name_name_pk PRIMARY KEY (group_name, name);
+ ADD CONSTRAINT rhn_confp_group_name_name_pk PRIMARY KEY (group_name, name)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_config_parameter
ADD CONSTRAINT rhn_confp_grpnm_group_name_fk FOREIGN KEY (group_name)
diff --git a/schema/spacewalk/common/tables/rhn_current_state_summaries.sql
b/schema/spacewalk/common/tables/rhn_current_state_summaries.sql
index 84c7be4..410a85c 100644
--- a/schema/spacewalk/common/tables/rhn_current_state_summaries.sql
+++ b/schema/spacewalk/common/tables/rhn_current_state_summaries.sql
@@ -27,10 +27,7 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_current_state_summaries IS 'cursu current state summaries
(monitoring)';
-CREATE UNIQUE INDEX rhn_current_state_summaries_pk
- ON rhn_current_state_summaries (customer_id, template_id, state)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_current_state_summaries
- ADD CONSTRAINT rhn_current_state_summaries_pk PRIMARY KEY (customer_id, template_id,
state);
+ ADD CONSTRAINT rhn_current_state_summaries_pk PRIMARY KEY (customer_id, template_id,
state)
+ USING INDEX TABLESPACE [[2m_tbs]];
diff --git a/schema/spacewalk/common/tables/rhn_os_commands_xref.sql
b/schema/spacewalk/common/tables/rhn_os_commands_xref.sql
index 887d007..bb30882 100644
--- a/schema/spacewalk/common/tables/rhn_os_commands_xref.sql
+++ b/schema/spacewalk/common/tables/rhn_os_commands_xref.sql
@@ -24,12 +24,9 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_os_commands_xref IS 'oscxr operating systems - commands cross
ref';
-CREATE UNIQUE INDEX rhn_oscxr_os_id_commands_id_pk
- ON rhn_os_commands_xref (os_id, commands_id)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_os_commands_xref
- ADD CONSTRAINT rhn_oscxr_os_id_commands_id_pk PRIMARY KEY (os_id, commands_id);
+ ADD CONSTRAINT rhn_oscxr_os_id_commands_id_pk PRIMARY KEY (os_id, commands_id)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_os_commands_xref
ADD CONSTRAINT rhn_oscxr_cmmnd_commands_id_fk FOREIGN KEY (commands_id)
diff --git a/schema/spacewalk/common/tables/rhn_probe.sql
b/schema/spacewalk/common/tables/rhn_probe.sql
index 0e1349f..c07f88c 100644
--- a/schema/spacewalk/common/tables/rhn_probe.sql
+++ b/schema/spacewalk/common/tables/rhn_probe.sql
@@ -40,10 +40,6 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_probe IS 'probe probe definitions';
-CREATE UNIQUE INDEX rhn_probe_recid_probe_type_uq
- ON rhn_probe (recid, probe_type)
- TABLESPACE [[8m_tbs]];
-
CREATE INDEX rhn_probe_check_command_id_idx
ON rhn_probe (command_id)
TABLESPACE [[8m_tbs]];
@@ -63,7 +59,8 @@ CREATE INDEX rhn_probe_contact_grp_idx
CREATE SEQUENCE rhn_probes_recid_seq;
ALTER TABLE rhn_probe
- ADD CONSTRAINT rhn_probe_recid_probe_type_uq UNIQUE (recid, probe_type);
+ ADD CONSTRAINT rhn_probe_recid_probe_type_uq UNIQUE (recid, probe_type)
+ USING INDEX TABLESPACE [[8m_tbs]];
ALTER TABLE rhn_probe
ADD CONSTRAINT rhn_probe_cmmnd_command_id_fk FOREIGN KEY (command_id)
diff --git a/schema/spacewalk/common/tables/rhn_probe_param_value.sql
b/schema/spacewalk/common/tables/rhn_probe_param_value.sql
index e2f606b..85161bc 100644
--- a/schema/spacewalk/common/tables/rhn_probe_param_value.sql
+++ b/schema/spacewalk/common/tables/rhn_probe_param_value.sql
@@ -28,12 +28,9 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_probe_param_value IS 'ppval param value for a probe running a
command';
-CREATE UNIQUE INDEX rhn_ppval_p_id_cmd_id_parm_pk
- ON rhn_probe_param_value (probe_id, command_id, param_name)
- TABLESPACE [[2m_tbs]];
-
ALTER TABLE rhn_probe_param_value
- ADD CONSTRAINT rhn_ppval_p_id_cmd_id_parm_pk PRIMARY KEY (probe_id, command_id,
param_name);
+ ADD CONSTRAINT rhn_ppval_p_id_cmd_id_parm_pk PRIMARY KEY (probe_id, command_id,
param_name)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_probe_param_value
ADD CONSTRAINT rhn_ppval_chkpb_probe_id_fk FOREIGN KEY (probe_id)
diff --git a/schema/spacewalk/common/tables/rhn_redirect_email_targets.sql
b/schema/spacewalk/common/tables/rhn_redirect_email_targets.sql
index b063178..5cca63d 100644
--- a/schema/spacewalk/common/tables/rhn_redirect_email_targets.sql
+++ b/schema/spacewalk/common/tables/rhn_redirect_email_targets.sql
@@ -24,16 +24,13 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_redirect_email_targets IS 'rdret redirect email targets';
-CREATE UNIQUE INDEX rhn_rdret_pk
- ON rhn_redirect_email_targets (redirect_id, email_address)
- TABLESPACE [[2m_tbs]];
-
CREATE INDEX rhn_rdret_redirect_id_idx
ON rhn_redirect_email_targets (redirect_id)
TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_email_targets
- ADD CONSTRAINT rhn_rdret_pk PRIMARY KEY (redirect_id, email_address);
+ ADD CONSTRAINT rhn_rdret_pk PRIMARY KEY (redirect_id, email_address)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_email_targets
ADD CONSTRAINT rhn_rdret_rdrct_redirect_id_fk FOREIGN KEY (redirect_id)
diff --git a/schema/spacewalk/common/tables/rhn_redirect_group_targets.sql
b/schema/spacewalk/common/tables/rhn_redirect_group_targets.sql
index 92f2d01..dfdf659 100644
--- a/schema/spacewalk/common/tables/rhn_redirect_group_targets.sql
+++ b/schema/spacewalk/common/tables/rhn_redirect_group_targets.sql
@@ -24,16 +24,13 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_redirect_group_targets IS 'rdrgt redirect group targets';
-CREATE UNIQUE INDEX rhn_rdrgt_pk
- ON rhn_redirect_group_targets (redirect_id, contact_group_id)
- TABLESPACE [[2m_tbs]];
-
CREATE INDEX rhn_rdrgt_redirect_id_idx
ON rhn_redirect_group_targets (redirect_id)
TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_group_targets
- ADD CONSTRAINT rhn_rdrgt_pk PRIMARY KEY (redirect_id, contact_group_id);
+ ADD CONSTRAINT rhn_rdrgt_pk PRIMARY KEY (redirect_id, contact_group_id)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_group_targets
ADD CONSTRAINT rhn_rdrgt_rdrct_redirect_id_fk FOREIGN KEY (redirect_id)
diff --git a/schema/spacewalk/common/tables/rhn_redirect_method_targets.sql
b/schema/spacewalk/common/tables/rhn_redirect_method_targets.sql
index 346efa7..2737c3a 100644
--- a/schema/spacewalk/common/tables/rhn_redirect_method_targets.sql
+++ b/schema/spacewalk/common/tables/rhn_redirect_method_targets.sql
@@ -24,10 +24,6 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_redirect_method_targets IS 'rdrme redirect method
targets';
-CREATE UNIQUE INDEX rhn_rdrme_pk
- ON rhn_redirect_method_targets (redirect_id, contact_method_id)
- TABLESPACE [[2m_tbs]];
-
CREATE INDEX rhn_rdrme_redirect_id_idx
ON rhn_redirect_method_targets (redirect_id)
TABLESPACE [[2m_tbs]];
@@ -37,7 +33,8 @@ CREATE INDEX rhn_rdrme_cmid_idx
TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_method_targets
- ADD CONSTRAINT rhn_rdrme_pk PRIMARY KEY (redirect_id, contact_method_id);
+ ADD CONSTRAINT rhn_rdrme_pk PRIMARY KEY (redirect_id, contact_method_id)
+ USING INDEX TABLESPACE [[2m_tbs]];
ALTER TABLE rhn_redirect_method_targets
ADD CONSTRAINT rhn_rdrmt_cmeth_redirect_id_fk FOREIGN KEY (contact_method_id)
diff --git a/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
b/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
index a07e532..eea275a 100644
--- a/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
+++ b/schema/spacewalk/common/tables/rhn_service_probe_origins.sql
@@ -26,16 +26,13 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_service_probe_origins IS 'srvpo mapping from a replicated
service probe to the check suite probe it was copied from. uq instead of pk because need
to set origin_probe_id to null!!!';
-CREATE UNIQUE INDEX rhn_srvpo_serv_pr_id_orig_uq
- ON rhn_service_probe_origins (service_probe_id, origin_probe_id)
- TABLESPACE [[8m_tbs]];
-
CREATE UNIQUE INDEX rhn_srvpo_serv_orig_pr_id_uq
ON rhn_service_probe_origins (origin_probe_id, service_probe_id)
TABLESPACE [[8m_tbs]];
ALTER TABLE rhn_service_probe_origins
- ADD CONSTRAINT rhn_srvpo_serv_pr_id_orig_uq UNIQUE (service_probe_id,
origin_probe_id);
+ ADD CONSTRAINT rhn_srvpo_serv_pr_id_orig_uq UNIQUE (service_probe_id,
origin_probe_id)
+ USING INDEX TABLESPACE [[8m_tbs]];
ALTER TABLE rhn_service_probe_origins
ADD CONSTRAINT rhn_srvpo_chkpb_orig_pr_id_fk FOREIGN KEY (origin_probe_id)
diff --git a/schema/spacewalk/common/tables/rhn_time_zone_names.sql
b/schema/spacewalk/common/tables/rhn_time_zone_names.sql
index c804828..3445784 100644
--- a/schema/spacewalk/common/tables/rhn_time_zone_names.sql
+++ b/schema/spacewalk/common/tables/rhn_time_zone_names.sql
@@ -31,10 +31,7 @@ ENABLE ROW MOVEMENT
COMMENT ON TABLE rhn_time_zone_names IS 'tznms time zone names';
-CREATE UNIQUE INDEX rhn_time_zone_names_uq
- ON rhn_time_zone_names (display_name)
- TABLESPACE [[64k_tbs]];
-
ALTER TABLE rhn_time_zone_names
- ADD CONSTRAINT rhn_time_zone_names_uq UNIQUE (display_name);
+ ADD CONSTRAINT rhn_time_zone_names_uq UNIQUE (display_name)
+ USING INDEX TABLESPACE [[64k_tbs]];
commit 5f12a161274145d8a7adf3d14b245969c355f762
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 26 16:30:11 2011 +0200
specify NOLOGGING directly
alter table makes tranformation to postgresql fail
diff --git a/schema/spacewalk/common/tables/rhnOrgErrataCacheQueue.sql
b/schema/spacewalk/common/tables/rhnOrgErrataCacheQueue.sql
index 3f19373..2109f19 100644
--- a/schema/spacewalk/common/tables/rhnOrgErrataCacheQueue.sql
+++ b/schema/spacewalk/common/tables/rhnOrgErrataCacheQueue.sql
@@ -25,15 +25,11 @@ CREATE TABLE rhnOrgErrataCacheQueue
DEFAULT (0) NOT NULL
)
ENABLE ROW MOVEMENT
+NOLOGGING
;
CREATE UNIQUE INDEX rhn_oecq_oid_uq
ON rhnOrgErrataCacheQueue (org_id)
+ NOLOGGING
TABLESPACE [[4m_tbs]];
-ALTER TABLE rhnOrgErrataCacheQueue
- NOLOGGING;
-
-ALTER INDEX rhn_oecq_oid_uq
- NOLOGGING;
-
diff --git a/schema/spacewalk/common/tables/rhnSet.sql
b/schema/spacewalk/common/tables/rhnSet.sql
index 78105d0..4ec9ad5 100644
--- a/schema/spacewalk/common/tables/rhnSet.sql
+++ b/schema/spacewalk/common/tables/rhnSet.sql
@@ -28,8 +28,6 @@ CREATE TABLE rhnSet
USING INDEX TABLESPACE [[8m_tbs]]
)
ENABLE ROW MOVEMENT
+NOLOGGING
;
-ALTER TABLE rhnSet
- NOLOGGING;
-
commit e2b1ae132a5c865cdf3be4ef5e9173835464c351
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 13:12:38 2011 +0200
chameleon is no more required
diff --git a/schema/spacewalk/spacewalk-schema.spec
b/schema/spacewalk/spacewalk-schema.spec
index cff8a0b..a8d1e4d 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -11,7 +11,6 @@ Url:
http://fedorahosted.org/spacewalk/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: chameleon
BuildRequires: perl(Digest::SHA1)
Obsoletes: rhn-satellite-schema <= 5.1.0
commit 880cd7b23be72f4c353f582e3148c9b68d28e711
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 13:11:57 2011 +0200
use new spacewalk-oracle2postgresql script
diff --git a/schema/spacewalk/common/Makefile b/schema/spacewalk/common/Makefile
index 81baaba..ee8847a 100644
--- a/schema/spacewalk/common/Makefile
+++ b/schema/spacewalk/common/Makefile
@@ -26,7 +26,7 @@ endif
SRCDIR := $(shell find $(COMMON) -name $(NAME))
SOURCES := $(wildcard $(SRCDIR)/*)
FILES := $(notdir $(SOURCES))
-CHAMELEON := chameleon -fs $(STYLE) $(CFLAGS)
+ORA2PG := ../../../spacewalk-oracle2postgresql
RMLINKS := find . -type l -delete
RMTRASH := rm -f lextab* parsetab* parser.out
@@ -38,7 +38,7 @@ files : $(FILES)
@$(RMTRASH)
%.sql : %.cql
- $(CHAMELEON) -o $@ $^
+ $(ORA2PG) $^ > $@
links :
@$(RMLINKS)
diff --git a/schema/spacewalk/postgres/tables/Makefile
b/schema/spacewalk/postgres/tables/Makefile
index a8a5113..5548040 100644
--- a/schema/spacewalk/postgres/tables/Makefile
+++ b/schema/spacewalk/postgres/tables/Makefile
@@ -10,7 +10,7 @@
#
COMMON := ../../common
-FLAGS := STYLE=postgres COMMON=../$(COMMON) CFLAGS="-O best"
+FLAGS := COMMON=../$(COMMON)
common :
@mkdir -p common
commit 054aa5fdacb180483ec0f6234d45148168cbcb43
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 29 13:07:24 2011 +0200
added sed script replacement for chameleon
diff --git a/schema/spacewalk/spacewalk-oracle2postgresql
b/schema/spacewalk/spacewalk-oracle2postgresql
new file mode 100755
index 0000000..54b0f88
--- /dev/null
+++ b/schema/spacewalk/spacewalk-oracle2postgresql
@@ -0,0 +1,25 @@
+#!/bin/sed -f
+
+# data types
+s/\bVARCHAR2/VARCHAR/i;
+s/\bDATE\b/TIMESTAMPTZ/i;
+s/\bNUMBER(\([1-9]\|1[0-9]\))/SMALLINT/i;
+s/\bNUMBER([0-9]\+,\([0-9]\+\))/FLOAT(\1)/i;
+s/\bNUMBER\b/NUMERIC/i;
+s/\bBLOB\b/BYTEA/i;
+
+# functions
+s/\bSYSDATE\b/CURRENT_TIMESTAMP/i;
+
+# tablespace and index clauses
+s/USING INDEX TABLESPACE[[:blank:]]\+\[\[[^[:blank:]]\+\]\]//i;
+s/\bTABLESPACE[[:blank:]]\+\[\[[^[:blank:]]\+\]\]//i;
+s/ENABLE ROW MOVEMENT//i;
+s/\(NO\)\?LOGGING//i;
+s/\(NO\)\?PARALLEL//i;
+
+# sequences
+s/\(CREATE[[:blank:]]\+SEQUENCE.*\)[[:blank:]]\+ORDER/\1/i;
+
+# strip white spaces
+s/^[[:blank:]]$//i;