Fixing Invalid Views Caused by 'EMMA-Upgrade_026' Upgrade Script
Validating the Status of the Script
Running the EMMA-upgrade_026 upgrade script may affect certain views, making them to be invalid.
Use the below query to check whether the EMMA-upgrade_026 upgrade sript was run.
SELECT 1 FROM upgrade_statements WHERE statement_id = 'EMMA-upgrade_026' AND status = 'FINISHED';
If the result is 1, it means the script was run.
Reverting Invalid Views
It is highly recommended to create a database and configuration backup before running the scripts!
To revert the invalid views after the upgrade, perform the following steps:
- Connect to the proper backup database where the affected views are working correctly.
- Run the proper script generator from below:
-- MYSQL
SELECT CONCAT('UPDATE object_revision SET description = ', description, ' WHERE object_Id = ', object_id, ' AND revision = ', revision) as 'script'
FROM object_revision
WHERE type_id = 47;
-- ORACLE
SELECT ('UPDATE object_revision SET description = ' || description || 'WHERE object_Id = ' || object_id || ' AND revision = ' || revision) as script
FROM object_revision
WHERE type_id = 47;
-- Postgtres
SELECT ('UPDATE object_revision SET description = ' || description || 'WHERE object_Id = ' || object_id || ' AND revision = ' || revision) as script
FROM object_revision
WHERE type_id = 47;
- Validate and save the output.
- Connect to the codebeamer database. Ensure to update the database in case of an issue.
- Stop codebeamer, if running.
- Run the generated scripts.
- Start codebeamer.
- Validate the views.