db_matches.dist.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * This script defines as closely as possible the matches between
  4. * original tables and destination (chamilo) tables and fields.
  5. */
  6. // This is an array that matches objects (for Chamilo)
  7. $matches = array(
  8. /* We need a numerical index for each table for easier reference later.
  9. The same origin table can be defined several time if it has fields that
  10. go into different destination tables */
  11. 0 => array (
  12. /* Original table */
  13. 'orig_table' => 'Alumno',
  14. /* Destination table. Leave empty if you just want to scan the
  15. original table to build up migration data.
  16. */
  17. 'dest_table' => '',
  18. /* Function to insert in dest table */
  19. 'dest_func' => 'MigrationCustom::store_user_data1',
  20. /* List of fields */
  21. 'fields_match' => array(
  22. /* Each field has a numerical ID for later processing */
  23. 0 => array(
  24. /* Original field name */
  25. 'orig' => 'intIdAlumno',
  26. /* If the SQL select has to alter the data before getting it in PHP,
  27. define the method that will return the right SQL select part
  28. */
  29. 'sql_alter' => 'sql_alter_unhash_50',
  30. /* Destination field name - leave empty
  31. and manage in func for complex operations */
  32. 'dest' => 'user_id',
  33. /* The special method that will be called from
  34. migration.custom.class.php when dealing with this particular field.
  35. Use 'none' if the field can be transferred "as is"
  36. If the original ID will not be re-used as is but will be required
  37. for the relationships with other tables, you should define a method
  38. that will log the relationship in a specific array.
  39. */
  40. 'func' => 'none',
  41. ),
  42. 1 => array(
  43. 'orig' => 'chrUsuarioCreacion',
  44. 'dest' => 'creation_date',
  45. 'func' => 'none',
  46. ),
  47. )
  48. )
  49. );