Unable to import requirement after migration of Zephyr from SaaS instance to On-Prem
Problem
Getting error message while importing the requirement after migration Zephyr from SaaS instance to On-Prem. Error message (The user specified as a definer (‘zephyr’@‘localhost’) does not exist’) and attached screen shot also.
Cause
Zephyr SaaS uses “zephyr” username and on-premises uses “root”. During the import the ownership of view is unclear, so getting the error.
Fix
Perform the below steps
-
shut down zephyr.
-
Login with root user
-
use <itcc> ;
-
Execute these SQLs. These will drop/recreate the views.
These are shipped along with startupdata itself. NO change here.DROP VIEW IF EXISTS `release_testcase_count`; DROP VIEW IF EXISTS `release_testcase_count_intermediate`; CREATE OR REPLACE VIEW `release_testcase_count_intermediate` AS ( select `rtm`.`requirement_id` `reqId`, tc.release_Id `relId` from (`requirement_testcase_mapping` `rtm` left outer join `testcase` `tc` on `rtm`.`testcase_id` = `tc`.`id`)); CREATE OR REPLACE VIEW `release_testcase_count` AS (select reqId as `requirement_id`, concat(relId, ':', count(relId)) as `tcCntbyRel` from release_testcase_count_intermediate as counttbl group by relId, reqId); -
Start zephyr.