def migrate_device_fields(apps, schema_editor):
    """
    Migrate new Device fields.
    """
    Device = apps.get_model('nsot', 'Device')
    Device_temp = apps.get_model('nsot', 'Device_temp')
    for dev in Device.objects.iterator():
        dev_tmp = Device_temp.objects.create(id=dev.resource_ptr_id,
            hostname=dev.hostname, _attributes_cache=dev._attributes, site=
            dev.site)
