INTRODUCTIONThe CiviCRM DB Tools package is a set of tools to help system administrators deal with low-level database problems.
To meet these two needs, the CiviCRM DB Tools package provides two distinct tools:
Both tools run from the command line and connect directly to the MySQL server, bypassing the CiviCRM software. They require the same versions of PHP and MySQL as CiviCRM. INSTALLATIONTo install the tools, download the package from the attachments tab or via the links below into any convenient directory and untar it. Additional documentation is in the docs directory of the package and available online. RELEASE NOTES1.2Support for CiviCRM 3.0Find non-existent tables referenced in saved searches Check for bad Member* references in civicrm_activity Add HTML unit test report Start unit tests without an existing test_civicrm_db_tools db in MySQL 1.1.4Fix more bugs left over from refactoring. Support civicrm_membership_type schema in 1.5, 1.6 Improve speed of CRM_Core_EntityTag::find_duplicates() 1.1.3Fix some bugs left over from refactoring. 1.1.2Change STDIN to fopen('php://stdin','r') in an attempt to improve portability Various bug fixes 1.1.1Fix bug in Utils::repair_contact1() Add section to unit tests for utility functions. 1.1Major refactoring to facilitate unit testing. Now using thePDO Extension as a data abstraction layer because it is required by PHPUnit_Extensions_Database 1.0.2Support for CiviCRM 2.2.2 1.0.1Schema detection algorithm smarter after 1.9 Exit if schema detection fails 1.0.0Support for CiviCRM 2.2.0 Add unit tests for the tools package Document how to modify the tools package Add checks and repairs for many fields Use mysql_free_result() liberally to reduce the runtime memory requirements of the tools 1.0-beta-7Check/repair contents of civicrm_worldregion 1.0-beta-6Support for CiviCRM 2.1.2 Support the ON DELETE action of foreign keys Include a customized PhpDocumentor package 1.0-beta-5Repair damage caused by CRM-3749 Identify old mailing jobs, allow deletion List tables in the database but not the schema Improved documentation. 1.0-beta-4Correct handling of multi-column keys and keys which do not match the schema. Improved documentation. 1.0-beta-3Ask user permission before updating or deleting any data. Output SQL to show the rows that violate the foreign key constraints, then offer several options, including no change. 1.0-beta-2 Fix problem in evaluating foreign key constraints on the same table that could produce false positive violations. civicrm_db_repair copies user-defined activity types into civicrm_option_values so the associated history won't be lost when upgrading to 2.0. Refactoring to eliminate duplicate code. Improve user documentation. Repairs database damage caused by these bugs:CRM-4191 Multi-level membership inheritance causes bin/UpdateMembershipRecord to produce duplicate membeships CRM-3771 Upgrade to 2.0 or 2.1 deletes civicrm_group_contact.location_id but it remains in schema CRM-3772 Upgrade to 2.0 adds region_id to civicrm_country but does not populate it CRM-3776 Upgrade to 2.0 fails if civicrm_custom_group.name longer than 35 chars CRM-2914 2.0 update routine destroys activity history records |
Database Troubleshooting Tools
Étiquette