A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fix 1023, 1024 migrations, add savedviewfilterrule migration
Michael Shamoonddff902291c8
diff --git a/src/documents/migrations/1023_add_comments.py b/src/documents/migrations/1023_add_comments.pyindex 124e4777c..2c89947e9 100644--- a/src/documents/migrations/1023_add_comments.py+++ b/src/documents/migrations/1023_add_comments.py@@ -1,4 +1,6 @@from django.db import migrations, models+import django.utils.timezone+from django.conf import settingsclass Migration(migrations.Migration):@@ -19,10 +21,49 @@ class Migration(migrations.Migration):verbose_name="ID",),),- ("comment", models.TextField()),- ("created", models.DateTimeField(auto_now_add=True)),- ("document_id", models.PositiveIntegerField()),- ("user_id", models.PositiveIntegerField()),+ (+ "comment",+ models.TextField(+ blank=True,+ help_text="Comment for the document",+ verbose_name="content",+ ),+ ),+ (+ "created",+ models.DateTimeField(+ db_index=True,+ default=django.utils.timezone.now,+ verbose_name="created",+ ),+ ),+ (+ "document",+ models.ForeignKey(+ blank=True,+ null=True,+ on_delete=django.db.models.deletion.CASCADE,+ related_name="documents",+ to="documents.document",+ verbose_name="document",+ ),+ ),+ (+ "user",+ models.ForeignKey(+ blank=True,+ null=True,+ on_delete=django.db.models.deletion.SET_NULL,+ related_name="users",+ to=settings.AUTH_USER_MODEL,+ verbose_name="user",+ ),+ ),],- )+ options={+ "verbose_name": "comment",+ "verbose_name_plural": "comments",+ "ordering": ("created",),+ },+ ),]diff --git a/src/documents/migrations/1023_document_original_filename.py b/src/documents/migrations/1024_document_original_filename.pysimilarity index 93%rename from src/documents/migrations/1023_document_original_filename.pyrename to src/documents/migrations/1024_document_original_filename.pyindex 065956bd9..b0f03cd50 100644--- a/src/documents/migrations/1023_document_original_filename.py+++ b/src/documents/migrations/1024_document_original_filename.py@@ -6,7 +6,7 @@ from django.db import migrations, modelsclass Migration(migrations.Migration):dependencies = [- ("documents", "1022_paperlesstask"),+ ("documents", "1023_add_comments"),]operations = [diff --git a/src/documents/migrations/1024_merge_20220824_1341.py b/src/documents/migrations/1024_merge_20220824_1341.pydeleted file mode 100644index 4a2b9706a..000000000--- a/src/documents/migrations/1024_merge_20220824_1341.py+++ /dev/null@@ -1,13 +0,0 @@-# Generated by Django 4.0.6 on 2022-08-24 13:41--from django.db import migrations---class Migration(migrations.Migration):-- dependencies = [- ("documents", "1023_add_comments"),- ("documents", "1023_document_original_filename"),- ]-- operations = []diff --git a/src/documents/migrations/1025_alter_savedviewfilterrule_rule_type.py b/src/documents/migrations/1025_alter_savedviewfilterrule_rule_type.pynew file mode 100644index 000000000..1e5b005b8--- /dev/null+++ b/src/documents/migrations/1025_alter_savedviewfilterrule_rule_type.py@@ -0,0 +1,48 @@+# Generated by Django 4.0.5 on 2022-08-26 16:49++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [+ ("documents", "1024_document_original_filename"),+ ]++ operations = [+ migrations.AlterField(+ model_name="savedviewfilterrule",+ name="rule_type",+ field=models.PositiveIntegerField(+ choices=[+ (0, "title contains"),+ (1, "content contains"),+ (2, "ASN is"),+ (3, "correspondent is"),+ (4, "document type is"),+ (5, "is in inbox"),+ (6, "has tag"),+ (7, "has any tag"),+ (8, "created before"),+ (9, "created after"),+ (10, "created year is"),+ (11, "created month is"),+ (12, "created day is"),+ (13, "added before"),+ (14, "added after"),+ (15, "modified before"),+ (16, "modified after"),+ (17, "does not have tag"),+ (18, "does not have ASN"),+ (19, "title or content contains"),+ (20, "fulltext query"),+ (21, "more like this"),+ (22, "has tags in"),+ (23, "ASN greater than"),+ (24, "ASN less than"),+ (25, "storage path is"),+ ],+ verbose_name="rule type",+ ),+ ),+ ]