diff --git a/apps/terminal/migrations/0021_auto_20200213_1316.py b/apps/terminal/migrations/0021_auto_20200213_1316.py new file mode 100644 index 000000000..7b1c62b38 --- /dev/null +++ b/apps/terminal/migrations/0021_auto_20200213_1316.py @@ -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), + ), + ] diff --git a/apps/terminal/models.py b/apps/terminal/models.py index 04bc74c67..66ca84907 100644 --- a/apps/terminal/models.py +++ b/apps/terminal/models.py @@ -181,7 +181,7 @@ class Session(OrgModelMixin): 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") 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_command = models.BooleanField(default=False, verbose_name=_("Command")) terminal = models.ForeignKey(Terminal, null=True, on_delete=models.SET_NULL)