# Generated by Django 2.0.13 on 2019-12-04 17:37

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    replaces = [('assets', '0007_auto_20190108_0202'), ('assets', '0008_auto_20191002_1931'), ('assets', '0009_auto_20191008_2148'), ('assets', '0010_auto_20191013_2123'), ('assets', '0011_auto_20191013_2247'), ('assets', '0012_auto_20191014_0012'), ('assets', '0013_auto_20191016_1446'), ('assets', '0014_auto_20191017_2052')]

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('assets', '0006_auto_20180728_1451_squashed_0021_auto_20190105_1156'),
    ]

    operations = [
        migrations.AlterField(
            model_name='asset',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='asset_parent', to='assets.Asset'),
        ),
        migrations.AlterField(
            model_name='cable',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='asset_parent', to='assets.Cable'),
        ),
        migrations.AlterField(
            model_name='connector',
            name='voltage_rating',
            field=models.IntegerField(help_text='Volts'),
        ),
        migrations.AlterModelOptions(
            name='asset',
            options={'base_manager_name': 'objects'},
        ),
        migrations.AlterModelOptions(
            name='cable',
            options={'base_manager_name': 'objects'},
        ),
        migrations.RemoveField(
            model_name='asset',
            name='length',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='asset_id',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='category',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='comments',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='date_acquired',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='date_sold',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='description',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='id',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='is_cable',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='next_sched_maint',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='parent',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='purchase_price',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='purchased_from',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='salvage_value',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='serial_number',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='status',
        ),
        migrations.AddField(
            model_name='asset',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_assets.asset_set+', to='contenttypes.ContentType'),
        ),
        migrations.AlterField(
            model_name='asset',
            name='asset_id',
            field=models.CharField(max_length=10, unique=True),
        ),
        migrations.RemoveField(
            model_name='cable',
            name='plug',
        ),
        migrations.RemoveField(
            model_name='cable',
            name='socket',
        ),
        migrations.AlterModelOptions(
            name='asset',
            options={},
        ),
        migrations.RemoveField(
            model_name='asset',
            name='polymorphic_ctype',
        ),
        migrations.AddField(
            model_name='asset',
            name='circuits',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='asset',
            name='cores',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='asset',
            name='csa',
            field=models.DecimalField(blank=True, decimal_places=2, help_text='mm^2', max_digits=10, null=True),
        ),
        migrations.AddField(
            model_name='asset',
            name='length',
            field=models.DecimalField(blank=True, decimal_places=1, help_text='m', max_digits=10, null=True),
        ),
        migrations.AddField(
            model_name='asset',
            name='plug',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='plug', to='assets.Connector'),
        ),
        migrations.AddField(
            model_name='asset',
            name='socket',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='socket', to='assets.Connector'),
        ),
        migrations.DeleteModel(
            name='Cable',
        ),
        migrations.AlterModelOptions(
            name='asset',
            options={'ordering': ['asset_id'], 'permissions': (('asset_finance', 'Can see financial data for assets'), ('view_asset', 'Can view an asset'))},
        ),
        migrations.AddField(
            model_name='assetstatus',
            name='should_show',
            field=models.BooleanField(default=True, help_text='Should this be shown by default in the asset list.'),
        ),
        migrations.AlterModelOptions(
            name='supplier',
            options={'permissions': (('view_supplier', 'Can view a supplier'),)},
        ),
    ]
