Red Hat Bugzilla – Bug 768031
Pin template failure on upgraded dbs.
Last modified: 2013-09-01 06:14:30 EDT
Upgrades from RHQ 4.1 to RHQ 4.3-SNAPSHOT are hitting the following
exception when tryng to pin a template:
-ERROR: null value in column "drift_definition_id" violates not-null constraint
The issue here is that the db upgrade is leaving an unwanted NOT NULL
constraint in the db.
The problem can be resolved by applying the following SQL manually:
Alter Table RHQ_DRIFT_CHANGE_SET Alter Column DRIFT_DEFINITION_ID Drop Not Null
Alter Table RHQ_DRIFT_CHANGE_SET Modify DRIFT_DEFINITION_ID null
master commit 638de1b71e5eb15b137ca2deda01299a30f5482c
Set RHQ_DRIFT_CHANGE_SET.DRIFT_DEFINITION_ID nullable in the db upgrade.
Also, this is a supporting commit:
- Fix a long standing issue in dbupgrade due to Oracle throwing exceptions
when trying to set nullable to the current value. In other words, the
upgrade would fail on oracle if you tried to set nullable false on a
column that was already nullable false. (same for nullable true). This
caused issues when you can't guarantee the current state, you just know
what you need it to be. Now, catch the relevant exceptions and toss
them as needed.
This problem only happens when upgrading from RHQ 4.1 to 4.3.
blocked by 751778
Commits in this BZ were made into master so setting target version to RHQ4.3
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.