lino_care.lib.care.migrate

This is a real-world example of how the application developer can provide automatic data migrations for The Python serializer.

This module is used because a Lino Care Site has migration_class set to "lino_care.lib.migrate.Migrator".

(This module's source code is available here.)

Functions

noop(*args)

Classes

Migrator(site, loader)

The standard migrator for Lino Care.

class lino_care.lib.care.migrate.Migrator(site, loader)

Bases: lino.utils.dpy.Migrator

The standard migrator for Lino Care.

migrate_from_0_0_1(globals_dict)
  • Convert products to topics.

  • Interest.product becomes Interest.topic

  • Interest.site.partner becomes Interest.partner and if the site has no partner, create one.

  • Rename Skill.product_cat to topic_group

  • Rename Competence.product to Competence.topic

migrate_from_1_0_1(globals_dict)

Move Deployment and Milestone from 'tickets' to new plugin 'deploy'.

migrate_from_1_0_2(globals_dict)
  • convert stars.Star to votes.Vote

unused_migrate_from_2016_12_0(globals_dict)
  • convert Ticket.assigned_to to votes

migrate_from_2016_12_1(globals_dict)
  • faculties.Faculty.faculty_type -> faculties.Faculty.skill_type

  • users.User now an MTI child of contacts.Person

  • convert Tickets.faculty to faculty.Demand instance