Попытка оптимизации #3 (Индексы)
This commit is contained in:
parent
7912998c94
commit
3f38f5f17e
25
apps/workerslocation/migrations/0017_auto_20250606_1253.py
Normal file
25
apps/workerslocation/migrations/0017_auto_20250606_1253.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.2.25 on 2025-06-06 12:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('workerslocation', '0016_auto_20250606_1104'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerstracking',
|
||||
name='workersloca_worker__d7aec1_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='workerstracking',
|
||||
name='workersloca_time_9a1c92_idx',
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='workerstracking',
|
||||
index=models.Index(fields=['worker', 'time'], name='workersloca_worker__f6ee2a_idx'),
|
||||
),
|
||||
]
|
||||
@ -59,7 +59,6 @@ class WorkersTracking(models.Model): # Передвижение персона
|
||||
verbose_name = "Передвижение сотрудника"
|
||||
verbose_name_plural = "Передвижения сотрудников"
|
||||
indexes = [
|
||||
models.Index(fields=["worker"]),
|
||||
models.Index(fields=["time",]),
|
||||
models.Index(fields=["time","worker"]),
|
||||
models.Index(fields=["worker","time"]),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user