from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("pobsync_backend", "0012_review_state"), ] operations = [ migrations.CreateModel( name="PurgedSnapshot", fields=[ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("host_name", models.CharField(max_length=255)), ("kind", models.CharField(max_length=16)), ("dirname", models.CharField(max_length=255)), ("path", models.CharField(max_length=1024)), ("reason", models.CharField(blank=True, max_length=512)), ( "action", models.CharField( choices=[ ("manual", "Manual"), ("scheduled", "Scheduled"), ("cli", "CLI"), ("incomplete_cleanup", "Incomplete cleanup"), ], max_length=32, ), ), ("triggered_by", models.CharField(blank=True, max_length=150)), ("metadata", models.JSONField(blank=True, default=dict)), ("purged_at", models.DateTimeField(auto_now_add=True)), ( "host", models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="purged_snapshots", to="pobsync_backend.hostconfig", ), ), ], options={ "ordering": ["-purged_at", "host_name", "dirname"], }, ), ]