# Generated by Django 4.2.23 on 2025-08-29 20:17

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


class Migration(migrations.Migration):

    dependencies = [
        ("NEMO_user_chemicals", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="ChemicalLocation",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(help_text="The name for this chemical storage location", max_length=255)),
            ],
            options={
                "verbose_name_plural": "Chemical Storage Location",
                "ordering": ["name"],
            },
        ),
        migrations.RemoveField(
            model_name="chemicalrequest",
            name="corrosive",
        ),
        migrations.RemoveField(
            model_name="chemicalrequest",
            name="flammable",
        ),
        migrations.RemoveField(
            model_name="chemicalrequest",
            name="reactive",
        ),
        migrations.RemoveField(
            model_name="chemicalrequest",
            name="sds_link",
        ),
        migrations.RemoveField(
            model_name="chemicalrequest",
            name="temp_sensitive",
        ),
        migrations.RemoveField(
            model_name="userchemical",
            name="chemical_name",
        ),
        migrations.RemoveField(
            model_name="userchemical",
            name="sds_link",
        ),
        migrations.AddField(
            model_name="chemicalrequest",
            name="hazards",
            field=models.ManyToManyField(
                blank=True, help_text="Select the hazards for this chemical.", to="NEMO.chemicalhazard"
            ),
        ),
        migrations.AddField(
            model_name="chemicalrequest",
            name="sds",
            field=models.FileField(
                blank=True, max_length=500, null=True, upload_to=NEMO.utilities.get_chemical_document_filename
            ),
        ),
        migrations.AddField(
            model_name="userchemical",
            name="chemical",
            field=models.ForeignKey(
                blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to="NEMO.chemical"
            ),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="chemical_name",
            field=models.CharField(max_length=255),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="exposure_controls",
            field=models.CharField(max_length=1024),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="exposure_routes",
            field=models.CharField(max_length=1024),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="health_hazards",
            field=models.CharField(max_length=1024),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="id",
            field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="incompatibilities",
            field=models.CharField(max_length=1024),
        ),
        migrations.AlterField(
            model_name="chemicalrequest",
            name="stability",
            field=models.CharField(max_length=1024),
        ),
        migrations.AlterField(
            model_name="userchemical",
            name="id",
            field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID"),
        ),
        migrations.AlterField(
            model_name="userchemical",
            name="location",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="NEMO_user_chemicals.chemicallocation",
            ),
        ),
    ]
