recreate index
This commit is contained in:
parent
e39a7b6c3c
commit
bdc8eedf3c
45
apps/gto/migrations/0021_auto_20250605_1655.py
Normal file
45
apps/gto/migrations/0021_auto_20250605_1655.py
Normal file
@ -0,0 +1,45 @@
|
||||
# Generated by Django 3.2.25 on 2025-06-05 16:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('gto', '0020_auto_20250605_1616'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveIndex(
|
||||
model_name='equipment',
|
||||
name='gto_equipme_time_f2ed8b_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='equipment',
|
||||
name='gto_equipme_block_93a763_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='equipmenttracking',
|
||||
name='gto_equipme_time_ffb373_idx',
|
||||
),
|
||||
migrations.RemoveIndex(
|
||||
model_name='equipmenttracking',
|
||||
name='gto_equipme_equipme_c4b351_idx',
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='equipment',
|
||||
index=models.Index(fields=['-time'], name='gto_equipme_time_91d62e_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='equipment',
|
||||
index=models.Index(fields=['block', '-time'], name='gto_equipme_block_328df7_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='equipmenttracking',
|
||||
index=models.Index(fields=['equipment', '-time'], name='gto_equipme_equipme_490e56_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='equipmenttracking',
|
||||
index=models.Index(fields=['-time'], name='gto_equipme_time_e9a7cd_idx'),
|
||||
),
|
||||
]
|
||||
@ -109,6 +109,6 @@ class Equipment(models.Model): # Оборудование
|
||||
indexes = [
|
||||
models.Index(fields=["uid", ]),
|
||||
models.Index(fields=["name", ]),
|
||||
models.Index(fields=["time", ]),
|
||||
models.Index(fields=["block", "time"]),
|
||||
models.Index(fields=["-time", ]),
|
||||
models.Index(fields=["block", "-time"]),
|
||||
]
|
||||
|
||||
@ -63,6 +63,6 @@ class EquipmentTracking(models.Model): # Передвижение оборуд
|
||||
verbose_name_plural = "Передвижение оборудования"
|
||||
indexes = [
|
||||
models.Index(fields=["eventid"]),
|
||||
models.Index(fields=["equipment", "time"]),
|
||||
models.Index(fields=["time"]),
|
||||
models.Index(fields=["equipment", "-time"]),
|
||||
models.Index(fields=["-time"]),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user