mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-01 07:27:35 +00:00
perf: add sftplog command models field index
This commit is contained in:
17
apps/terminal/migrations/0007_command_idx_timestamp_org.py
Normal file
17
apps/terminal/migrations/0007_command_idx_timestamp_org.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.1.13 on 2025-04-21 06:15
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0006_endpoint_oracle_port'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name='command',
|
||||
index=models.Index(fields=['timestamp', 'org_id'], name='idx_timestamp_org'),
|
||||
),
|
||||
]
|
@@ -74,3 +74,6 @@ class Command(AbstractSessionCommand):
|
||||
db_table = "terminal_command"
|
||||
ordering = ('-timestamp',)
|
||||
verbose_name = _('Command record')
|
||||
indexes = [
|
||||
models.Index(fields=['timestamp', 'org_id'], name='idx_timestamp_org'),
|
||||
]
|
||||
|
Reference in New Issue
Block a user