add index for models
This commit is contained in:
1 parent
028ea6e5f9
commit
e2d566436f
13 files changed
+165
-29
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 6.0 on 2026-04-23 20:07
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('announcement', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name='announcement',
|
||||
index=models.Index(fields=['visible', '-top', '-create_time'], name='announcement_list_idx'),
|
||||
),
|
||||
]
|
||||
Reference in new issue
Block a user