3

We have a website using CiviCRM that was recently switched from Drupal to WordPress as well as to a new server.

Everything on the website is working properly and they have had no issues with CiviCRM.

The problem: The websites and databases are backed up every night and the old backups are deleted upon completion of the backups. The CiviCRM database backup is failing because the database has 2 views (civicrm_view_case_activity_recent and civicrm_view_case_activity_upcoming) which have a "definer" which was carried over from the last server and does not exist on the new server.

The question(s): Is there a way to redefine the definer without recreating those views?

If not, is there code available to recreate those views?

Thanks!

2

1 Answer 1

2

It is possible to recreate the views using the following script. (It also recreates the triggers and stored functions that can have the same problem

<?php
   civicrm_initialize();
   Civi::service('sql_triggers')->rebuild(null, false);
   CRM_Case_BAO_Case::createCaseViews();

Run the script with drush scr <script.php>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.