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) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing create date when converting from legacy system
Pages: [1]

Author Topic: Importing create date when converting from legacy system  (Read 669 times)

questions

  • Guest
Importing create date when converting from legacy system
November 13, 2010, 05:33:36 pm
In our old database we kept track of when a new individual or household was added to the database.  It looks like Civi uses the log to get at when someone was added.  I assume there is no way to import this information and that I'll need to probably write some sql to add a record into the log table.   (I guess temporary creating a custom field to hold the data for import and then writing sql to add the record in log would be a way to get the value initially into the database and then after conversion delete the custom field.)

Is there a better way?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Importing create date when converting from legacy system
November 13, 2010, 06:41:44 pm

the described way seems to be the best way.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Importing create date when converting from legacy system
November 13, 2010, 08:59:08 pm
We did something a bit similar lately but rather than moving the data from the custom field we wrote a simple pre_form hook that set the default for that field for today's date so our customer could keep using that field.

We did it that way because it seemed easiest but I recently saw comments by Lobo on the IRC suggesting that the civicrm_log table get pruned occasionally as it can get really large. I'm rather wondering if any organisations do that and what 'rules' they apply. Also, how significant is it on performance? My understanding is that whether the query is well optimised is much more important than the overall size of the table.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing create date when converting from legacy system

This forum was archived on 2017-11-26.