Skip to content

Commit 25b288d

Browse files
author
Ivan Katanovic
committed
Fix index_together
1 parent 5e292f4 commit 25b288d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.27 on 2026-01-28 08:52
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('daguerre', '0004_hash_upload_to_dir'),
10+
]
11+
12+
operations = [
13+
migrations.RenameIndex(
14+
model_name='adjustedimage',
15+
new_name='daguerre_ad_request_fab777_idx',
16+
old_fields=('requested', 'storage_path'),
17+
),
18+
]

daguerre/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ class AdjustedImage(models.Model):
161161
requested = models.CharField(max_length=100)
162162

163163
class Meta:
164-
index_together = [['requested', 'storage_path'], ]
164+
indexes = [
165+
models.Index(fields=['requested', 'storage_path']),
166+
]
165167

166168
def __str__(self):
167169
return u"{0}: {1}".format(self.storage_path, self.requested)

0 commit comments

Comments
 (0)