8

You can export the civicrm database without triggers and functions and After importing and making sure you have CiviCRM working, recreate the triggers by running 'civicrm/menu/rebuild?reset=1&triggerRebuild=1' in browser


6

I had the same problem today, so I looked in the source code. In civicrm.install there's a function called _civicrm_get_db_config. It's looking in the $databases array for an element with a key civicrm. So I added this to settings.php: $databases['civicrm']['default'] = array ( 'database' => 'civi_db_name', 'username' => 'mysqluser', '...


5

This looks to be a problem with an entity_type row of PaymentProcessorType in the civicrm_managed table. To show the offending row: select * from civicrm_managed where entity_type='PaymentProcessorType'; Remove the offending row: delete from civicrm_managed where entity_type='PaymentProcessorType'; Then re-run the upgrade. After the upgrade was re-run, I ...


5

That's really two operations: splitting the combined db to separate WP and Civi ones, and migrating. For the migration part see the manual. To split the db, you could make a duplicate of the original as the Civi db (dump and load), then in the Civi one delete all the non-civi tables and in the original/WP one, delete all the civi tables. In your civicrm....


5

You could do something like CRM_Core_DAO::executeQuery("SELECT LAST_INSERT_ID()");. If your needs are simple that seems like the easiest. Probably to do it "right", you would use civix generate:entity. See https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-entity Then you could do things in an object-y way, like: $myclass = new MyClass(); $...


4

One small gotcha with large deletions: MySQL may not free-up the space in the way you expect. The exact mechanics and numbers probably depend on the variant of MySQL and its configuration options, but just for a general sense: if the goal is to reduce the disk-usage of those tables on the active system by 75% (8gb to 2gb), then you might try to DELETE the ...


4

we have a custom overnight routine that copies data from civicrm_mailing_x and civicrm_mailing_event_x tables to duplicate tables with a archive namespace and then deletes the appropriate rows from the main tables. The biggest things is making sure that you adequately understand the relationships between the tables so you don't accidentally delete data that ...


4

The payment method of a contribution table is stored on the civicrm_financial_trxn table. Payments and Contributions are related through civicrm_entity_financial_trxn table. Some discussions about similar issues have recently taken place on financial issue board. Please consider whether you can make a contribution on any of them or if you need to report a ...


3

There had been an issue recently where way more 'changes' where logged than intended: https://lab.civicrm.org/dev/core/issues/449. Can you verify that it is still growing way too fast since running on a patched version? The information you are looking for is stored in the table civicrm_subscription_history aswell as civicrm_group_contact for current status....


3

Also see https://civicrm.stackexchange.com/a/31644/225 where the suggested fix is: ALTER TABLE civicrm_menu ROW_FORMAT=DYNAMIC Then rebuild the menus


3

I've had an excellent experience using this extension: https://github.com/jitendrapurohit/nz.co.fuzion.deleteoldbulkmailings I needed a few small fixes for my purposes (include a limit parameter and removal of code that assumed extended logging is on), which you can see in my fork here: https://github.com/adixon/nz.co.fuzion.deleteoldbulkmailings As I ...


3

This is so that you can temporarily or permanently remove a campaign from being selected. If you have say 30 campaigns and 20 of them are completed, you don't really want them cluttering up the drop down lists when you create events etc. You only want the active campaigns.


3

Am I allowed to answer my own question? lol. I was able to resolve the DB error for this specific smart group by changing the Operator criteria from "Empty" to "Null". So "IS EMPTY" became "IS NULL" and "NOT EMPTY" became "NOT NULL". Also, I find it somewhat important to note now that whenever I attempted to edit this Smart Group's search criteria, I ...


3

We had a similar problem importing from an old (non CiviCRM system) and I wanted to make the old membership numbers the Contact ids on the new CiviCRM system. Fortunately membership numbers 1 & 2 were not in use so no clash with the initial admin and organisation contact records. There were some gaps in the old membership numbers and I was also quite ...


2

Good question. There's some discussion here about utf8mb4_unicode_520_ci or utf8mb4_0900_ai_ci, but there's maybe some issues with that since at the moment in the associated changes it seems to be staying at utf8_unicode_ci. But it might change. But the warning might be due to your global settings. In order to support this you need barracuda format ...


2

It depends what you mean by "all records", but the custom search called full-text search (under Search - Custom Searches) can be made to run via url like so: https://dmaster.demo.civicrm.org/civicrm/contact/search/custom?csid=15&text=894-1515&table=Contact&force=1&reset=1 That will bring up the contact with phone 894-1515. If you want to ...


2

I'm afraid this isn't a scenario covered by core or an extension. Only custom fields can be set readonly. For a fast but hacky solution you could try a javascript approach.


2

I began to import the database in pieces to a new installation to see if I could pinpoint where the issue might be coming up in the database. I found that the problem was with the civicm_setting table. There was a row added for address formatting that had the weird characters in it. I deleted the row and the problem disappeared.


2

Was this all driven by wanting to move from Drupal to WordPress? If so, you can do this at the database level since most of Civi's data is independent of the CMS. See https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/switch-cms/


1

Maybe you have some hidden characters in your address - this can for example happen during an import?! You could try cutting the text and then paste it without formatting again using CTRL+SHIFT+V.


1

It's in civicrm_log. Entity_id matches civicrm_contact.id and entity_table='civicrm_contact'. Modified_id is the contact id of who modified it. Or if you have detailed logging turned on there's also entries in the log_civicrm_xxx tables.


1

It's in the civicrm_contact table


1

this might be a mariadb config issue. # enable large indexes and Barracuda # for utf8mb4 innodb_file_per_table=1 innodb_file_format=Barracuda innodb_large_prefix=1 might also change the tables to ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED see this post for much more info on this front https://stackoverflow.com/questions/15585602/change-limit-for-mysql-...


1

Suggestions from various folks on chat include the following settings in my.cnf: innodb_log_file_size (may be too small by default) innodb_large_prefix=true innodb_file_format=barracuda I changed those and was still having issues. This setting fixed it for me (and may be due to the site running on MariaDB?). innodb_strict_mode=0


1

After a lot of digging, I realised what was happening. For some reason, there was a second civicrm_saved_search table in the database named civicrm_saved_search-b . That hyphen - is an 'illegal' character unless you escape it. To resolve the issue, all I did was change the - to a _ which cleared everything up and enabled me to upgrade my site within ...


1

I think you are saying that you have a single database for CMS content on the old site and that you already have new CMS content in the database for the new site. I think you want to move the CiviCRM structure and data. If I have understood that correctly (it would be good if you clarified by editing the question) then you can do the following. 1) split the ...


1

Thanks to comments by Demerit, my confusion arises from the fact that our MySQL server and web server (with core CiviCRM files) are separate. The 173.236.128.0/255.255.128.0 mask matches our web server and so that definer field in the trigger just indicates the server from which the triggerRebuild command was executed. There was nothing wrong with our ...


1

I managed to resolve this dilemma. The goal was to move a 2 database Drupal/CiviCRM website into the CiviCRM Starterkit platform which requires that Drupal and CiviCRM use a single database. I was not able to import my database dump into the existing Drupal website because although I had set foreign_key check to zero, I was receiving a "Cannot add foreign ...


1

LAE, You can do this in many ways As suggested by Demerit you can use Full text search and append in url. If you are using Drupal, then you can use Views to create list of contact and then use CONTEXTUAL FILTERS to filter based on arguments from URL HTH Pradeep


1

It was my table and column collation settings. Both were latin1_swedish_ci. Evidently this collation does not support the weirdo characters those foreigners use ;^). I rolled the database back using the backup I made (ALWAYS glad I make a backup before upgrading!!!). Then using phpMyAdmin I edited the table civicrm_state_province to have a collation of ...


Only top voted, non community-wiki answers of a minimum length are eligible