recreate index
This commit is contained in:
parent
bdc8eedf3c
commit
2831b0493b
45
apps/workerslocation/migrations/0013_auto_20250605_1700.py
Normal file
45
apps/workerslocation/migrations/0013_auto_20250605_1700.py
Normal file
@ -0,0 +1,45 @@
|
||||
# Generated by Django 3.2.25 on 2025-06-05 17:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('workerslocation', '0012_auto_20250605_1627'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerslocation',
|
||||
name='workersloca_update__0a4688_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerslocation',
|
||||
name='workersloca_active_c3b753_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerstracking',
|
||||
name='workersloca_time_9a1c92_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerstracking',
|
||||
name='workersloca_worker__f6ee2a_idx',
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='workerslocation',
|
||||
index=models.Index(fields=['-update_time'], name='workersloca_update__16350c_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='workerslocation',
|
||||
index=models.Index(fields=['active', '-update_time'], name='workersloca_active_991295_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='workerstracking',
|
||||
index=models.Index(fields=['worker', '-time'], name='workersloca_worker__c2007b_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='workerstracking',
|
||||
index=models.Index(fields=['-time'], name='workersloca_time_4b870c_idx'),
|
||||
),
|
||||
]
|
||||
@ -85,6 +85,6 @@ class WorkersLocation(models.Model):
|
||||
indexes = [
|
||||
models.Index(fields=["uid", ]),
|
||||
models.Index(fields=["name", ]),
|
||||
models.Index(fields=["update_time", ]),
|
||||
models.Index(fields=["active", "update_time", ]),
|
||||
models.Index(fields=["-update_time", ]),
|
||||
models.Index(fields=["active", "-update_time", ]),
|
||||
]
|
||||
|
||||
@ -59,6 +59,6 @@ class WorkersTracking(models.Model): # Передвижение персона
|
||||
verbose_name = "Передвижение сотрудника"
|
||||
verbose_name_plural = "Передвижения сотрудников"
|
||||
indexes = [
|
||||
models.Index(fields=["worker", "time"]),
|
||||
models.Index(fields=["time",]),
|
||||
models.Index(fields=["worker", "-time"]),
|
||||
models.Index(fields=["-time",]),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user