From b6714c202fb1173cd7f52999d0f49e91bad5efe4 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Tue, 12 Nov 2024 01:51:19 -0800 Subject: [PATCH] Increase the title character limit to 500 for conversations --- .../migrations/0074_alter_conversation_title.py | 17 +++++++++++++++++ src/khoj/database/models/__init__.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/khoj/database/migrations/0074_alter_conversation_title.py diff --git a/src/khoj/database/migrations/0074_alter_conversation_title.py b/src/khoj/database/migrations/0074_alter_conversation_title.py new file mode 100644 index 00000000..068f8575 --- /dev/null +++ b/src/khoj/database/migrations/0074_alter_conversation_title.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.9 on 2024-11-12 09:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("database", "0073_delete_usersearchmodelconfig"), + ] + + operations = [ + migrations.AlterField( + model_name="conversation", + name="title", + field=models.CharField(blank=True, default=None, max_length=500, null=True), + ), + ] diff --git a/src/khoj/database/models/__init__.py b/src/khoj/database/models/__init__.py index bcd8d376..8f6c5c78 100644 --- a/src/khoj/database/models/__init__.py +++ b/src/khoj/database/models/__init__.py @@ -463,7 +463,7 @@ class Conversation(BaseModel): slug = models.CharField(max_length=200, default=None, null=True, blank=True) # The title field is explicitly set by the user. - title = models.CharField(max_length=200, default=None, null=True, blank=True) + title = models.CharField(max_length=500, default=None, null=True, blank=True) agent = models.ForeignKey(Agent, on_delete=models.SET_NULL, default=None, null=True, blank=True) file_filters = models.JSONField(default=list) id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True, db_index=True)