def transfer_elements(apps, schema_editor):
    """ Transfer records from deprecated PageLayoutElements to new page_types block field
    :param apps
    :param schema_editor
    :return: None
    """
    PageLayoutElement = apps.get_model('ninecms', 'PageLayoutElement')
    for element in PageLayoutElement.objects.all():
        element.block.page_types.add(element.page_type)
