[Update] 优化session 索引 is_finished (#3697)

pull/3698/head
老广 5 years ago committed by GitHub
parent edf6baa52d
commit 5d313a827b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,18 @@
# Generated by Django 2.2.10 on 2020-02-13 05:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('terminal', '0020_auto_20191218_1721'),
]
operations = [
migrations.AlterField(
model_name='session',
name='is_finished',
field=models.BooleanField(db_index=True, default=False),
),
]

@ -181,7 +181,7 @@ class Session(OrgModelMixin):
system_user_id = models.CharField(blank=True, default='', max_length=36, db_index=True) system_user_id = models.CharField(blank=True, default='', max_length=36, db_index=True)
login_from = models.CharField(max_length=2, choices=LOGIN_FROM_CHOICES, default="ST") login_from = models.CharField(max_length=2, choices=LOGIN_FROM_CHOICES, default="ST")
remote_addr = models.CharField(max_length=128, verbose_name=_("Remote addr"), blank=True, null=True) remote_addr = models.CharField(max_length=128, verbose_name=_("Remote addr"), blank=True, null=True)
is_finished = models.BooleanField(default=False) is_finished = models.BooleanField(default=False, db_index=True)
has_replay = models.BooleanField(default=False, verbose_name=_("Replay")) has_replay = models.BooleanField(default=False, verbose_name=_("Replay"))
has_command = models.BooleanField(default=False, verbose_name=_("Command")) has_command = models.BooleanField(default=False, verbose_name=_("Command"))
terminal = models.ForeignKey(Terminal, null=True, on_delete=models.SET_NULL) terminal = models.ForeignKey(Terminal, null=True, on_delete=models.SET_NULL)

Loading…
Cancel
Save