backend/satellite_tools/xmlSource.py
| 3 +--
backend/server/importlib/backendOracle.py
| 5 ++---
backend/server/importlib/importLib.py
| 3 +--
schema/spacewalk/rhnsat/tables/rhnReleaseChannelMap.sql
| 10 +++-------
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/121-rhnReleaseChannelMap.sql
| 5 +++++
5 files changed, 12 insertions(+), 14 deletions(-)
New commits:
commit 5bb7e31fce60fea12d596ab5a2cb33a09185f0c1
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Mon Jun 1 10:54:54 2009 -0400
503243 - Dropping the is_default column as we now determine the default in the app
code based on the compatible eus channel instead of jus the default.
- Also unique constraint is on product,version,arch and release instead of is_default.
This should fix the issue of syncing multiple eus channels to satellite.
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 0e5001f..0bfbda2 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -629,8 +629,7 @@ class ReleaseItem(BaseItem):
item_name = 'rhn-release'
item_class = importLib.ReleaseChannelMap
tagMap = {
- 'channel-arch' : 'channel_arch',
- 'is-default' : 'is_default',
+ 'channel-arch' : 'channel_arch'
}
addItem(ReleaseItem)
diff --git a/backend/server/importlib/backendOracle.py
b/backend/server/importlib/backendOracle.py
index fddc8e4..99b53e7 100644
--- a/backend/server/importlib/backendOracle.py
+++ b/backend/server/importlib/backendOracle.py
@@ -314,10 +314,9 @@ class OracleBackend(Backend):
'version' : DBstring(64),
'release' : DBstring(64),
'channel_arch_id': DBint(),
- 'channel_id' : DBint(),
- 'is_default' : DBstring(1)
+ 'channel_id' : DBint()
},
- pk = ['product', 'version', 'release',
'channel_arch_id', 'channel_id', 'is_default'],
+ pk = ['product', 'version', 'release',
'channel_arch_id', 'channel_id'],
attribute = 'release',
defaultSeverity = 4,
),
diff --git a/backend/server/importlib/importLib.py
b/backend/server/importlib/importLib.py
index 10f8fed..ab9138c 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -170,8 +170,7 @@ class ReleaseChannelMap(Information):
'version' : StringType,
'release' : StringType,
'channel_arch_id' : IntType,
- 'channel_id' : IntType,
- 'is_default' : StringType,
+ 'channel_id' : IntType
}
diff --git a/schema/spacewalk/rhnsat/tables/rhnReleaseChannelMap.sql
b/schema/spacewalk/rhnsat/tables/rhnReleaseChannelMap.sql
index bb950df..f95ca9f 100644
--- a/schema/spacewalk/rhnsat/tables/rhnReleaseChannelMap.sql
+++ b/schema/spacewalk/rhnsat/tables/rhnReleaseChannelMap.sql
@@ -25,11 +25,7 @@ rhnReleaseChannelMap
channel_arch_id number
constraint rhn_rcm_caid_nn not null,
channel_id number
- constraint rhn_rcm_cid_nn not null,
- is_default char(1)
- constraint rhn_rcm_default_nn not null,
- constraint rhn_rcm_default_ck
- check (is_default in ('Y', 'N'))
+ constraint rhn_rcm_cid_nn not null
)
enable row movement
;
@@ -40,7 +36,7 @@ create index rhn_rcm_prod_ver_rel_caid_idx
;
alter table rhnReleaseChannelMap
-add constraint rhn_rcm_pva_def_uniq
-unique (product, version, channel_arch_id, is_default)
+add constraint rhn_rcm_pvar_uniq
+unique (product, version, channel_arch_id, release)
;
diff --git
a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/121-rhnReleaseChannelMap.sql
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/121-rhnReleaseChannelMap.sql
new file mode 100644
index 0000000..7383816
--- /dev/null
+++
b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/121-rhnReleaseChannelMap.sql
@@ -0,0 +1,5 @@
+ALTER TABLE rhnReleaseChannelMap DROP CONSTRAINT rhn_rcm_pva_def_uniq;
+ALTER TABLE rhnReleaseChannelMap DROP COLUMN is_default;
+ALTER TABLE rhnReleaseChannelMap
+ADD CONSTRAINT rhn_rcm_pvar_uniq
+unique (product, version, channel_arch_id, release);