CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Gift Aid: migrating from Drupal module to extension
Pages: [1]

Author Topic: Gift Aid: migrating from Drupal module to extension  (Read 747 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Gift Aid: migrating from Drupal module to extension
July 28, 2014, 08:18:03 am
Hi,

This post by Rajesh mentions migrating from the old Gift Aid Drupal module to Gift Aid extension v1.
https://forum.civicrm.org/index.php?topic=24653.10

This page describes upgrading from Gift Aid extension v1 to v2.
http://www.compucorp.co.uk/blog/civicrm-gift-aid-instructions-v43

I'm starting from a site that has been using the old Gift Aid Drupal 6 module. I've tried upgrading first to Gift Aid extension v1, by disabling (but not uninstalling) the Gift Aid Drupal 6 module, then installing Gift Aid extension v1. Installation fails with a db error logged:

[db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_custom_field (custom_group_id , name , label , data_type , html_type , is_required , is_searchable , is_search_range , weight , is_active , is_view , text_length , note_columns , note_rows , column_name ) VALUES ( 31 , 'Eligible_for_Gift_Aid' , 'UK Tax Payer?' , 'Boolean' , 'Radio' ,  1 ,  0 ,  0 ,  1 ,  1 ,  0 ,  255 ,  60 ,  4 , 'eligible_for_gift_aid' )  [nativecode=1062 ** Duplicate entry 'Eligible_for_Gift_Aid-31' for key 'UI_name_custom_group_id']"]

I then tried going straight to Gift Aid extension v2.2 . This fails with a similar db error:
Extension Upgrade Failed: DB Error: already exists
with this in the log:

...
#3 /var/www/html/dorcom/drupal-6.32/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: already exists", -5, 16, (Array:2), "INSERT INTO civicrm_custom_field (custom_group_id , name , label , data_type ...")
#4 /var/www/html/dorcom/drupal-6.32/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-5, 16, (Array:2), "INSERT INTO civicrm_custom_field (custom_group_id , name , label , data_type ...")
#5 /var/www/html/dorcom/drupal-6.32/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -5, NULL, NULL, "INSERT INTO civicrm_custom_field (custom_group_id , name , label , data_type ...", "DB_Error", TRUE)
#6 /var/www/html/dorcom/drupal-6.32/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-5, NULL, NULL, NULL, "1062 ** Duplicate entry 'Eligible_for_Gift_Aid-31' for key 'UI_name_custom_gr...")
...

I gather from Rajesh's post https://forum.civicrm.org/index.php/topic,24653.msg103783.html#msg103783 that there were changes to the custom data structure when Gift Aid was ported to an extension, so I guess I can't simply comment out the code that creates the custom fields.

Is there a procedure for migrating from Gift Aid Drupal 6 module to the current Gift Aid extension, without data loss?

Cheers,

Dave

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Gift Aid: migrating from Drupal module to extension

This forum was archived on 2017-11-26.