Bug 598575

Summary: ORA-01400 on adding new alter notification
Product: [Other] RHQ Project Reporter: Thilo Solbrig <thilo.solbrig>
Component: AlertsAssignee: Joseph Marques <jmarques>
Status: CLOSED WORKSFORME QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: jmarques
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-23 23:32:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thilo Solbrig 2010-06-01 16:20:15 UTC
Description of problem:
Adding an alert notification fails with ORA-01400 when working on an upgraded database schema. Doesn't appear on fresh installed schema.

Version-Release number of selected component (if applicable):
3.0.0B06

How reproducible:
Install RHQ Server 3.0.0B06 on an existing, older schema and let install procedure upgrade it. Try to create a alert notification. After choosing alert sender type, click OK. ORA-01400 for RHQ_ALERT_NOTIFICATION.NOTIFICATION_TYPE appears.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
ORA-01400

Expected results:
Alert notification would be added.

Additional info:
Seems to be caused by columns not been dropped during schema upgrade. RHQ_ALERT_NOTIFICATION has following columns on fresh install:
ID
ALERT_DEFINITION_ID
SENDER_CONFIG_ID
SENDER_NAME

and this columns after upgrade from an older version:
ID
NOTIFICATION_TYPE
ALERT_DEFINITION_ID
NOTIF_TEMPLATE_ID
ALERT_CONFIG_ID
ALERT_SENDER_NAME
ALERT_ORDER
NAME
SENDER_CONFIG_ID
SENDER_NAME

Should be save to drop the additional columns.

Comment 1 Joseph Marques 2010-06-23 23:32:24 UTC
Thilo Solbrig, thank you for catching this.  There were indeed some minor bugs in the upgrade functionality which have now been resolved.  When 3.0.0 is released within the next week or so, the upgrade should work from any previous GA version.