示例#1
0
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)
示例#2
0
def items(source, include):
    """Migrate documents from CDS legacy."""
    with commit():
        import_items_from_json(source, include=include)
示例#3
0
def internal_locations(source, include):
    """Migrate documents from CDS legacy."""
    with commit():
        import_internal_locations_from_json(source, include=include)
示例#4
0
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)
示例#5
0
def serial():
    """Create relations for migrated serials."""
    with commit():
        link_documents_and_serials()
    reindex_pidtype('docid')
    reindex_pidtype('serid')
示例#6
0
def multipart():
    """Create relations for migrated multiparts."""
    with commit():
        link_and_create_multipart_volumes()
    reindex_pidtype('docid')
    reindex_pidtype('serid')