36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# Generated by Django 6.1.1 on 2026-09-29
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("fireworks_detect", "0002_sensor_event_sensor_pendingevent_sensor"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="ClassificationRule",
|
|
fields=[
|
|
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
|
("value", models.CharField(max_length=255)),
|
|
(
|
|
"rule_type",
|
|
models.CharField(
|
|
choices=[("whitelist", "Whitelist"), ("blacklist", "Blacklist")],
|
|
max_length=10,
|
|
),
|
|
),
|
|
("enabled", models.BooleanField(default=True)),
|
|
],
|
|
options={
|
|
"ordering": ["value"],
|
|
},
|
|
),
|
|
migrations.AddConstraint(
|
|
model_name="classificationrule",
|
|
constraint=models.UniqueConstraint(fields=("value", "rule_type"), name="unique_classification_rule"),
|
|
),
|
|
]
|