|
|
@@ -26,49 +26,50 @@ def set_null_values(apps, schema_editor):
|
|
|
RackType = apps.get_model('dcim', 'RackType')
|
|
|
RearPort = apps.get_model('dcim', 'RearPort')
|
|
|
Site = apps.get_model('dcim', 'Site')
|
|
|
+ db_alias = schema_editor.connection.alias
|
|
|
|
|
|
- Cable.objects.filter(length_unit='').update(length_unit=None)
|
|
|
- Cable.objects.filter(type='').update(type=None)
|
|
|
- ConsolePort.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- ConsolePort.objects.filter(type='').update(type=None)
|
|
|
- ConsolePortTemplate.objects.filter(type='').update(type=None)
|
|
|
- ConsoleServerPort.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- ConsoleServerPort.objects.filter(type='').update(type=None)
|
|
|
- ConsoleServerPortTemplate.objects.filter(type='').update(type=None)
|
|
|
- Device.objects.filter(airflow='').update(airflow=None)
|
|
|
- Device.objects.filter(face='').update(face=None)
|
|
|
- DeviceType.objects.filter(airflow='').update(airflow=None)
|
|
|
- DeviceType.objects.filter(subdevice_role='').update(subdevice_role=None)
|
|
|
- DeviceType.objects.filter(weight_unit='').update(weight_unit=None)
|
|
|
- FrontPort.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- Interface.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- Interface.objects.filter(mode='').update(mode=None)
|
|
|
- Interface.objects.filter(poe_mode='').update(poe_mode=None)
|
|
|
- Interface.objects.filter(poe_type='').update(poe_type=None)
|
|
|
- Interface.objects.filter(rf_channel='').update(rf_channel=None)
|
|
|
- Interface.objects.filter(rf_role='').update(rf_role=None)
|
|
|
- InterfaceTemplate.objects.filter(poe_mode='').update(poe_mode=None)
|
|
|
- InterfaceTemplate.objects.filter(poe_type='').update(poe_type=None)
|
|
|
- InterfaceTemplate.objects.filter(rf_role='').update(rf_role=None)
|
|
|
- ModuleType.objects.filter(airflow='').update(airflow=None)
|
|
|
- ModuleType.objects.filter(weight_unit='').update(weight_unit=None)
|
|
|
- PowerFeed.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- PowerOutlet.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- PowerOutlet.objects.filter(feed_leg='').update(feed_leg=None)
|
|
|
- PowerOutlet.objects.filter(type='').update(type=None)
|
|
|
- PowerOutletTemplate.objects.filter(feed_leg='').update(feed_leg=None)
|
|
|
- PowerOutletTemplate.objects.filter(type='').update(type=None)
|
|
|
- PowerPort.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- PowerPort.objects.filter(type='').update(type=None)
|
|
|
- PowerPortTemplate.objects.filter(type='').update(type=None)
|
|
|
- Rack.objects.filter(airflow='').update(airflow=None)
|
|
|
- Rack.objects.filter(form_factor='').update(form_factor=None)
|
|
|
- Rack.objects.filter(outer_unit='').update(outer_unit=None)
|
|
|
- Rack.objects.filter(weight_unit='').update(weight_unit=None)
|
|
|
- RackType.objects.filter(outer_unit='').update(outer_unit=None)
|
|
|
- RackType.objects.filter(weight_unit='').update(weight_unit=None)
|
|
|
- RearPort.objects.filter(cable_end='').update(cable_end=None)
|
|
|
- Site.objects.filter(time_zone='').update(time_zone=None)
|
|
|
+ Cable.objects.using(db_alias).filter(length_unit='').update(length_unit=None)
|
|
|
+ Cable.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ ConsolePort.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ ConsolePort.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ ConsolePortTemplate.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ ConsoleServerPort.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ ConsoleServerPort.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ ConsoleServerPortTemplate.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ Device.objects.using(db_alias).filter(airflow='').update(airflow=None)
|
|
|
+ Device.objects.using(db_alias).filter(face='').update(face=None)
|
|
|
+ DeviceType.objects.using(db_alias).filter(airflow='').update(airflow=None)
|
|
|
+ DeviceType.objects.using(db_alias).filter(subdevice_role='').update(subdevice_role=None)
|
|
|
+ DeviceType.objects.using(db_alias).filter(weight_unit='').update(weight_unit=None)
|
|
|
+ FrontPort.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ Interface.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ Interface.objects.using(db_alias).filter(mode='').update(mode=None)
|
|
|
+ Interface.objects.using(db_alias).filter(poe_mode='').update(poe_mode=None)
|
|
|
+ Interface.objects.using(db_alias).filter(poe_type='').update(poe_type=None)
|
|
|
+ Interface.objects.using(db_alias).filter(rf_channel='').update(rf_channel=None)
|
|
|
+ Interface.objects.using(db_alias).filter(rf_role='').update(rf_role=None)
|
|
|
+ InterfaceTemplate.objects.using(db_alias).filter(poe_mode='').update(poe_mode=None)
|
|
|
+ InterfaceTemplate.objects.using(db_alias).filter(poe_type='').update(poe_type=None)
|
|
|
+ InterfaceTemplate.objects.using(db_alias).filter(rf_role='').update(rf_role=None)
|
|
|
+ ModuleType.objects.using(db_alias).filter(airflow='').update(airflow=None)
|
|
|
+ ModuleType.objects.using(db_alias).filter(weight_unit='').update(weight_unit=None)
|
|
|
+ PowerFeed.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ PowerOutlet.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ PowerOutlet.objects.using(db_alias).filter(feed_leg='').update(feed_leg=None)
|
|
|
+ PowerOutlet.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ PowerOutletTemplate.objects.using(db_alias).filter(feed_leg='').update(feed_leg=None)
|
|
|
+ PowerOutletTemplate.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ PowerPort.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ PowerPort.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ PowerPortTemplate.objects.using(db_alias).filter(type='').update(type=None)
|
|
|
+ Rack.objects.using(db_alias).filter(airflow='').update(airflow=None)
|
|
|
+ Rack.objects.using(db_alias).filter(form_factor='').update(form_factor=None)
|
|
|
+ Rack.objects.using(db_alias).filter(outer_unit='').update(outer_unit=None)
|
|
|
+ Rack.objects.using(db_alias).filter(weight_unit='').update(weight_unit=None)
|
|
|
+ RackType.objects.using(db_alias).filter(outer_unit='').update(outer_unit=None)
|
|
|
+ RackType.objects.using(db_alias).filter(weight_unit='').update(weight_unit=None)
|
|
|
+ RearPort.objects.using(db_alias).filter(cable_end='').update(cable_end=None)
|
|
|
+ Site.objects.using(db_alias).filter(time_zone='').update(time_zone=None)
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|