mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Fix 1023, 1024 migrations, add savedviewfilterrule migration
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.utils.timezone
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class 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",),
 | 
			
		||||
            },
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ from django.db import migrations, models
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ("documents", "1022_paperlesstask"),
 | 
			
		||||
        ("documents", "1023_add_comments"),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
@@ -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 = []
 | 
			
		||||
@@ -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",
 | 
			
		||||
            ),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
		Reference in New Issue
	
	Block a user