# Generated by Django 5.2.8 on 2026-06-20 12:40

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("bambu_run", "0005_printermetrics_vortek_raw"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="filamentsnapshot",
            options={
                "ordering": ["printer_metric", "ams_unit_id", "tray_id"],
                "verbose_name": "Filament Snapshot",
                "verbose_name_plural": "Filament Snapshots",
            },
        ),
        migrations.AddField(
            model_name="filamentsnapshot",
            name="ams_type",
            field=models.CharField(
                blank=True,
                choices=[
                    ("AMS", "AMS"),
                    ("AMS 2 Pro", "AMS 2 Pro"),
                    ("AMS HT", "AMS HT"),
                ],
                default="",
                help_text="Type of the AMS unit this tray belongs to (AMS / AMS 2 Pro / AMS HT)",
                max_length=32,
            ),
        ),
        migrations.AddField(
            model_name="filamentsnapshot",
            name="ams_unit_id",
            field=models.PositiveSmallIntegerField(
                blank=True,
                db_index=True,
                help_text="Which physical AMS unit this tray belongs to (matches MQTT ams[i].id; 128 = AMS HT)",
                null=True,
            ),
        ),
        migrations.AddField(
            model_name="filamentusage",
            name="ams_unit_id",
            field=models.PositiveSmallIntegerField(
                blank=True,
                db_index=True,
                help_text="Which physical AMS unit the slot belongs to (matches MQTT ams[i].id; 128 = AMS HT)",
                null=True,
            ),
        ),
        migrations.AddIndex(
            model_name="filamentsnapshot",
            index=models.Index(
                fields=["printer_metric", "ams_unit_id", "tray_id"],
                name="infrastruct_printer_2ad168_idx",
            ),
        ),
    ]
