Fix duplicate key on SQLite (#4038)

* Fix duplicate key on SQLite

* Update migration
This commit is contained in:
Raphael Michel
2024-04-02 17:37:37 +02:00
committed by GitHub
parent 3b6d0c4341
commit 440c97061c
2 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
# Generated by Django 4.2.10 on 2024-04-02 15:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("pretixbase", "0259_team_require_2fa"),
]
operations = [
migrations.AlterIndexTogether(
name="reusablemedium",
index_together=set(),
),
]

View File

@@ -122,7 +122,6 @@ class ReusableMedium(LoggedModel):
class Meta:
unique_together = (("identifier", "type", "organizer"),)
indexes = [
models.Index(fields=("identifier", "type", "organizer")),
models.Index(fields=("updated", "id")),
]
ordering = "identifier", "type", "organizer"