]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix this migration
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 30 Sep 2025 17:44:08 +0000 (10:44 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 30 Sep 2025 17:44:13 +0000 (10:44 -0700)
src/paperless/migrations/0005_applicationconfiguration_ai_enabled_and_more.py
src/paperless/models.py

index 0776091da1948983e9bc1fa6395a70ba329ab22c..df0de835106175a19d28fcdd49dbe286bc03e732 100644 (file)
@@ -1,4 +1,4 @@
-# Generated by Django 5.1.8 on 2025-04-30 02:38
+# Generated by Django 5.2.6 on 2025-09-30 17:43
 
 from django.db import migrations
 from django.db import models
@@ -25,6 +25,7 @@ class Migration(migrations.Migration):
             field=models.CharField(
                 blank=True,
                 max_length=128,
+                null=True,
                 verbose_name="Sets the LLM API key",
             ),
         ),
@@ -35,6 +36,7 @@ class Migration(migrations.Migration):
                 blank=True,
                 choices=[("openai", "OpenAI"), ("ollama", "Ollama")],
                 max_length=32,
+                null=True,
                 verbose_name="Sets the LLM backend",
             ),
         ),
@@ -45,6 +47,7 @@ class Migration(migrations.Migration):
                 blank=True,
                 choices=[("openai", "OpenAI"), ("huggingface", "Huggingface")],
                 max_length=32,
+                null=True,
                 verbose_name="Sets the LLM embedding backend",
             ),
         ),
@@ -54,25 +57,28 @@ class Migration(migrations.Migration):
             field=models.CharField(
                 blank=True,
                 max_length=32,
+                null=True,
                 verbose_name="Sets the LLM embedding model",
             ),
         ),
         migrations.AddField(
             model_name="applicationconfiguration",
-            name="llm_model",
+            name="llm_endpoint",
             field=models.CharField(
                 blank=True,
-                max_length=32,
-                verbose_name="Sets the LLM model",
+                max_length=128,
+                null=True,
+                verbose_name="Sets the LLM endpoint, optional",
             ),
         ),
         migrations.AddField(
             model_name="applicationconfiguration",
-            name="llm_endpoint",
+            name="llm_model",
             field=models.CharField(
                 blank=True,
-                max_length=128,
-                verbose_name="Sets the LLM endpoint, optional",
+                max_length=32,
+                null=True,
+                verbose_name="Sets the LLM model",
             ),
         ),
     ]
index e77e73bccbc175861f41c0f74d753d033482aec3..81ad8b176fb7c68bd3bd080f59f03d90f994ccd6 100644 (file)
@@ -292,6 +292,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
     llm_embedding_backend = models.CharField(
         verbose_name=_("Sets the LLM embedding backend"),
         blank=True,
+        null=True,
         max_length=32,
         choices=LLMEmbeddingBackend.choices,
     )
@@ -299,12 +300,14 @@ class ApplicationConfiguration(AbstractSingletonModel):
     llm_embedding_model = models.CharField(
         verbose_name=_("Sets the LLM embedding model"),
         blank=True,
+        null=True,
         max_length=32,
     )
 
     llm_backend = models.CharField(
         verbose_name=_("Sets the LLM backend"),
         blank=True,
+        null=True,
         max_length=32,
         choices=LLMBackend.choices,
     )
@@ -312,18 +315,21 @@ class ApplicationConfiguration(AbstractSingletonModel):
     llm_model = models.CharField(
         verbose_name=_("Sets the LLM model"),
         blank=True,
+        null=True,
         max_length=32,
     )
 
     llm_api_key = models.CharField(
         verbose_name=_("Sets the LLM API key"),
         blank=True,
+        null=True,
         max_length=128,
     )
 
     llm_endpoint = models.CharField(
         verbose_name=_("Sets the LLM endpoint, optional"),
         blank=True,
+        null=True,
         max_length=128,
     )