From 19d9811de26c2a174bdf963a9f69b5a6aa78640d Mon Sep 17 00:00:00 2001 From: Tehom Date: Fri, 25 Oct 2019 08:33:14 -0400 Subject: [PATCH] Add index to typeclass path. Closes #1975 --- .../migrations/0009_auto_20191025_0831.py | 23 +++++++++++++++++ .../migrations/0018_auto_20191025_0831.py | 18 +++++++++++++ .../migrations/0011_auto_20191025_0831.py | 25 +++++++++++++++++++ .../migrations/0013_auto_20191025_0831.py | 18 +++++++++++++ evennia/typeclasses/models.py | 1 + 5 files changed, 85 insertions(+) create mode 100644 evennia/accounts/migrations/0009_auto_20191025_0831.py create mode 100644 evennia/comms/migrations/0018_auto_20191025_0831.py create mode 100644 evennia/objects/migrations/0011_auto_20191025_0831.py create mode 100644 evennia/scripts/migrations/0013_auto_20191025_0831.py diff --git a/evennia/accounts/migrations/0009_auto_20191025_0831.py b/evennia/accounts/migrations/0009_auto_20191025_0831.py new file mode 100644 index 0000000000..42500ae25b --- /dev/null +++ b/evennia/accounts/migrations/0009_auto_20191025_0831.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.6 on 2019-10-25 12:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0008_auto_20190128_1820'), + ] + + operations = [ + migrations.AlterField( + model_name='accountdb', + name='db_typeclass_path', + field=models.CharField(db_index=True, help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass'), + ), + migrations.AlterField( + model_name='accountdb', + name='last_name', + field=models.CharField(blank=True, max_length=150, verbose_name='last name'), + ), + ] diff --git a/evennia/comms/migrations/0018_auto_20191025_0831.py b/evennia/comms/migrations/0018_auto_20191025_0831.py new file mode 100644 index 0000000000..e73a6ed067 --- /dev/null +++ b/evennia/comms/migrations/0018_auto_20191025_0831.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.6 on 2019-10-25 12:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('comms', '0017_auto_20190128_1820'), + ] + + operations = [ + migrations.AlterField( + model_name='channeldb', + name='db_typeclass_path', + field=models.CharField(db_index=True, help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass'), + ), + ] diff --git a/evennia/objects/migrations/0011_auto_20191025_0831.py b/evennia/objects/migrations/0011_auto_20191025_0831.py new file mode 100644 index 0000000000..f946acaad8 --- /dev/null +++ b/evennia/objects/migrations/0011_auto_20191025_0831.py @@ -0,0 +1,25 @@ +# Generated by Django 2.2.6 on 2019-10-25 12:31 + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + + dependencies = [ + ('objects', '0010_auto_20190128_1820'), + ] + + operations = [ + migrations.AlterField( + model_name='objectdb', + name='db_sessid', + field=models.CharField(help_text='csv list of session ids of connected Account, if any.', max_length=32, null=True, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='session id'), + ), + migrations.AlterField( + model_name='objectdb', + name='db_typeclass_path', + field=models.CharField(db_index=True, help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass'), + ), + ] diff --git a/evennia/scripts/migrations/0013_auto_20191025_0831.py b/evennia/scripts/migrations/0013_auto_20191025_0831.py new file mode 100644 index 0000000000..9dca21d75a --- /dev/null +++ b/evennia/scripts/migrations/0013_auto_20191025_0831.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.6 on 2019-10-25 12:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('scripts', '0012_auto_20190128_1820'), + ] + + operations = [ + migrations.AlterField( + model_name='scriptdb', + name='db_typeclass_path', + field=models.CharField(db_index=True, help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", max_length=255, null=True, verbose_name='typeclass'), + ), + ] diff --git a/evennia/typeclasses/models.py b/evennia/typeclasses/models.py index 22cdd9bb5a..b20f7ca3d4 100644 --- a/evennia/typeclasses/models.py +++ b/evennia/typeclasses/models.py @@ -191,6 +191,7 @@ class TypedObject(SharedMemoryModel): max_length=255, null=True, help_text="this defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass.", + db_index=True, ) # Creation date. This is not changed once the object is created. db_date_created = models.DateTimeField("creation date", editable=False, auto_now_add=True)