You are here

d6_uc_roles_license.yml in Commerce License 8.2

migrations/d6_uc_roles_license.yml

File

migrations/d6_uc_roles_license.yml
View source
  1. # Migrates role purchase licenses from UC Roles module.
  2. # This is incomplete and is intended as an example.
  3. id: d6_uc_roles_license
  4. label: License from D6 Ubercart Roles.
  5. migration_tags:
  6. - Drupal 6
  7. - Ubercart
  8. migration_group: default
  9. source:
  10. plugin: d6_ubercart_license_role
  11. process:
  12. type:
  13. # Migrate into the role license type.
  14. plugin: default_value
  15. default_value: role
  16. uid:
  17. plugin: migration_lookup
  18. migration: # your user migration
  19. source: uid
  20. state:
  21. plugin: default_value
  22. default_value: active
  23. product_variation:
  24. plugin: migration_lookup
  25. migration: # your product variation migration
  26. source: nid
  27. expiration_type:
  28. # This assumes Commerce Recurring is used with licenses.
  29. plugin: default_value
  30. default_value:
  31. target_plugin_id: unlimited
  32. created: created
  33. granted: created
  34. renewed: renewed
  35. changed: renewed
  36. expires:
  37. # This assumes Commerce Recurring is used with licenses.
  38. plugin: default_value
  39. default_value: 0
  40. license_role:
  41. plugin: default_value
  42. default_value: # needs a role value, or a migration lookup.
  43. destination:
  44. plugin: entity:commerce_license
  45. destination_module: commerce_license
  46. migration_dependencies:
  47. required: {}
  48. optional: {}
  49. dependencies:
  50. enforced:
  51. module:
  52. - commerce_product
  53. - commerce_license