def documents(sources, source_type, include): """Migrate documents from CDS legacy.""" with commit(): if source_type == 'migrator-kit': import_documents_from_record_file(sources, include) else: import_documents_from_dump(sources=sources, source_type=source_type, eager=True, include=include)
def items(source, include): """Migrate documents from CDS legacy.""" with commit(): import_items_from_json(source, include=include)
def internal_locations(source, include): """Migrate documents from CDS legacy.""" with commit(): import_internal_locations_from_json(source, include=include)
def parents(rectype, source, include): """Migrate parents serials or multiparts from dumps.""" click.echo('Migrating {}s...'.format(rectype)) with commit(): import_parents_from_file(source, rectype=rectype, include=include)
def serial(): """Create relations for migrated serials.""" with commit(): link_documents_and_serials() reindex_pidtype('docid') reindex_pidtype('serid')
def multipart(): """Create relations for migrated multiparts.""" with commit(): link_and_create_multipart_volumes() reindex_pidtype('docid') reindex_pidtype('serid')