frontend: make dff shortname unique

This commit is contained in:
Pierre Bourdon
2023-01-27 05:40:09 +01:00
parent ae095750e6
commit 6b7945ab85
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.1.5 on 2023-01-27 04:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("frontend", "0002_alter_version_hash"),
]
operations = [
migrations.AlterField(
model_name="fifotest",
name="shortname",
field=models.CharField(db_index=True, max_length=32, unique=True),
),
]

View File

@@ -9,7 +9,7 @@ from django.urls import reverse
class FifoTest(models.Model):
file = models.FileField(upload_to="dff/", max_length=256)
name = models.CharField(max_length=128)
shortname = models.CharField(max_length=32, db_index=True)
shortname = models.CharField(max_length=32, unique=True, db_index=True)
active = models.BooleanField(default=True, db_index=True)
description = models.TextField(blank=True)