Chore: Remove old migrations and re-create them fresh for v3 (#11854)

This commit is contained in:
Trenton H
2026-01-24 15:02:56 -08:00
committed by GitHub
parent 2d9717a330
commit 4271812c2d
154 changed files with 2337 additions and 12615 deletions

View File

@@ -1,6 +1,8 @@
# Generated by Django 3.1.3 on 2020-11-15 22:54
# Generated by Django 5.2.9 on 2026-01-20 18:46
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations
from django.db import models
@@ -9,7 +11,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
("documents", "1002_auto_20201111_1105"),
("documents", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
@@ -25,9 +28,23 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
("name", models.CharField(max_length=256, unique=True)),
("imap_server", models.CharField(max_length=256)),
("imap_port", models.IntegerField(blank=True, null=True)),
(
"name",
models.CharField(max_length=256, unique=True, verbose_name="name"),
),
(
"imap_server",
models.CharField(max_length=256, verbose_name="IMAP server"),
),
(
"imap_port",
models.IntegerField(
blank=True,
help_text="This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.",
null=True,
verbose_name="IMAP port",
),
),
(
"imap_security",
models.PositiveIntegerField(
@@ -37,11 +54,69 @@ class Migration(migrations.Migration):
(3, "Use STARTTLS"),
],
default=2,
verbose_name="IMAP security",
),
),
("username", models.CharField(max_length=256, verbose_name="username")),
("password", models.TextField(verbose_name="password")),
(
"is_token",
models.BooleanField(
default=False,
verbose_name="Is token authentication",
),
),
(
"character_set",
models.CharField(
default="UTF-8",
help_text="The character set to use when communicating with the mail server, such as 'UTF-8' or 'US-ASCII'.",
max_length=256,
verbose_name="character set",
),
),
(
"account_type",
models.PositiveIntegerField(
choices=[(1, "IMAP"), (2, "Gmail OAuth"), (3, "Outlook OAuth")],
default=1,
verbose_name="account type",
),
),
(
"refresh_token",
models.TextField(
blank=True,
help_text="The refresh token to use for token authentication e.g. with oauth2.",
null=True,
verbose_name="refresh token",
),
),
(
"expiration",
models.DateTimeField(
blank=True,
help_text="The expiration date of the refresh token. ",
null=True,
verbose_name="expiration",
),
),
(
"owner",
models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
("username", models.CharField(max_length=256)),
("password", models.CharField(max_length=256)),
],
options={
"verbose_name": "mail account",
"verbose_name_plural": "mail accounts",
},
),
migrations.CreateModel(
name="MailRule",
@@ -55,21 +130,126 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
("name", models.CharField(max_length=256)),
("folder", models.CharField(default="INBOX", max_length=256)),
("name", models.CharField(max_length=256, verbose_name="name")),
("order", models.IntegerField(default=0, verbose_name="order")),
("enabled", models.BooleanField(default=True, verbose_name="enabled")),
(
"folder",
models.CharField(
default="INBOX",
help_text="Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server.",
max_length=256,
verbose_name="folder",
),
),
(
"filter_from",
models.CharField(blank=True, max_length=256, null=True),
models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter from",
),
),
(
"filter_to",
models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter to",
),
),
(
"filter_subject",
models.CharField(blank=True, max_length=256, null=True),
models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter subject",
),
),
(
"filter_body",
models.CharField(blank=True, max_length=256, null=True),
models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter body",
),
),
(
"filter_attachment_filename_include",
models.CharField(
blank=True,
help_text="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename inclusive",
),
),
(
"filter_attachment_filename_exclude",
models.CharField(
blank=True,
help_text="Do not consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename exclusive",
),
),
(
"maximum_age",
models.PositiveIntegerField(
default=30,
help_text="Specified in days.",
verbose_name="maximum age",
),
),
(
"attachment_type",
models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(2, "Process all files, including 'inline' attachments."),
],
default=1,
help_text="Inline attachments include embedded images, so it's best to combine this option with a filename filter.",
verbose_name="attachment type",
),
),
(
"consumption_scope",
models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(
2,
"Process full Mail (with embedded attachments in file) as .eml",
),
(
3,
"Process full Mail (with embedded attachments in file) as .eml + process attachments as separate documents",
),
],
default=1,
verbose_name="consumption scope",
),
),
(
"pdf_layout",
models.PositiveIntegerField(
choices=[
(0, "System default"),
(1, "Text, then HTML"),
(2, "HTML, then text"),
(3, "HTML only"),
(4, "Text only"),
],
default=0,
verbose_name="pdf layout",
),
),
("maximum_age", models.PositiveIntegerField(default=30)),
(
"action",
models.PositiveIntegerField(
@@ -78,18 +258,23 @@ class Migration(migrations.Migration):
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(
5,
"Tag the mail with specified tag, don't process tagged mails",
),
],
default=3,
help_text="The action applied to the mail. This action is only performed when documents were consumed from the mail. Mails without attachments will remain entirely untouched.",
verbose_name="action",
),
),
(
"action_parameter",
models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action.",
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action. Subfolders must be separated by dots.",
max_length=256,
null=True,
verbose_name="action parameter",
),
),
(
@@ -98,8 +283,10 @@ class Migration(migrations.Migration):
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
(3, "Do not assign title from rule"),
],
default=1,
verbose_name="assign title from",
),
),
(
@@ -112,6 +299,14 @@ class Migration(migrations.Migration):
(4, "Use correspondent selected below"),
],
default=1,
verbose_name="assign correspondent from",
),
),
(
"assign_owner_from_rule",
models.BooleanField(
default=True,
verbose_name="Assign the rule owner to documents",
),
),
(
@@ -120,6 +315,7 @@ class Migration(migrations.Migration):
on_delete=django.db.models.deletion.CASCADE,
related_name="rules",
to="paperless_mail.mailaccount",
verbose_name="account",
),
),
(
@@ -129,6 +325,7 @@ class Migration(migrations.Migration):
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.correspondent",
verbose_name="assign this correspondent",
),
),
(
@@ -138,17 +335,136 @@ class Migration(migrations.Migration):
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.documenttype",
verbose_name="assign this document type",
),
),
(
"assign_tag",
"assign_tags",
models.ManyToManyField(
blank=True,
to="documents.tag",
verbose_name="assign this tag",
),
),
(
"owner",
models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.tag",
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
],
options={
"verbose_name": "mail rule",
"verbose_name_plural": "mail rules",
},
),
migrations.CreateModel(
name="ProcessedMail",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"folder",
models.CharField(
editable=False,
max_length=256,
verbose_name="folder",
),
),
(
"uid",
models.CharField(
editable=False,
max_length=256,
verbose_name="uid",
),
),
(
"subject",
models.CharField(
editable=False,
max_length=256,
verbose_name="subject",
),
),
(
"received",
models.DateTimeField(editable=False, verbose_name="received"),
),
(
"processed",
models.DateTimeField(
default=django.utils.timezone.now,
editable=False,
verbose_name="processed",
),
),
(
"status",
models.CharField(
editable=False,
max_length=256,
verbose_name="status",
),
),
(
"error",
models.TextField(
blank=True,
editable=False,
null=True,
verbose_name="error",
),
),
(
"owner",
models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
(
"rule",
models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
to="paperless_mail.mailrule",
),
),
],
options={
"abstract": False,
},
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
fields=("name", "owner"),
name="paperless_mail_mailrule_unique_name_owner",
),
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
condition=models.Q(("owner__isnull", True)),
fields=("name",),
name="paperless_mail_mailrule_name_unique",
),
),
]

View File

@@ -1,477 +0,0 @@
# Generated by Django 4.2.13 on 2024-06-28 17:46
import django.db.migrations.operations.special
import django.db.models.deletion
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
replaces = [
("paperless_mail", "0001_initial"),
("paperless_mail", "0002_auto_20201117_1334"),
("paperless_mail", "0003_auto_20201118_1940"),
("paperless_mail", "0004_mailrule_order"),
("paperless_mail", "0005_help_texts"),
("paperless_mail", "0006_auto_20210101_2340"),
("paperless_mail", "0007_auto_20210106_0138"),
("paperless_mail", "0008_auto_20210516_0940"),
("paperless_mail", "0009_mailrule_assign_tags"),
]
dependencies = [
("documents", "1002_auto_20201111_1105"),
("documents", "1011_auto_20210101_2340"),
]
operations = [
migrations.CreateModel(
name="MailAccount",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=256, unique=True)),
("imap_server", models.CharField(max_length=256)),
("imap_port", models.IntegerField(blank=True, null=True)),
(
"imap_security",
models.PositiveIntegerField(
choices=[
(1, "No encryption"),
(2, "Use SSL"),
(3, "Use STARTTLS"),
],
default=2,
),
),
("username", models.CharField(max_length=256)),
("password", models.CharField(max_length=256)),
],
),
migrations.CreateModel(
name="MailRule",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=256)),
("folder", models.CharField(default="INBOX", max_length=256)),
(
"filter_from",
models.CharField(blank=True, max_length=256, null=True),
),
(
"filter_subject",
models.CharField(blank=True, max_length=256, null=True),
),
(
"filter_body",
models.CharField(blank=True, max_length=256, null=True),
),
("maximum_age", models.PositiveIntegerField(default=30)),
(
"action",
models.PositiveIntegerField(
choices=[
(1, "Delete"),
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
],
default=3,
help_text="The action applied to the mail. This action is only performed when documents were consumed from the mail. Mails without attachments will remain entirely untouched.",
),
),
(
"action_parameter",
models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action.",
max_length=256,
null=True,
),
),
(
"assign_title_from",
models.PositiveIntegerField(
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
],
default=1,
),
),
(
"assign_correspondent_from",
models.PositiveIntegerField(
choices=[
(1, "Do not assign a correspondent"),
(2, "Use mail address"),
(3, "Use name (or mail address if not available)"),
(4, "Use correspondent selected below"),
],
default=1,
),
),
(
"account",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="rules",
to="paperless_mail.mailaccount",
),
),
(
"assign_correspondent",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.correspondent",
),
),
(
"assign_document_type",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.documenttype",
),
),
(
"assign_tag",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.tag",
),
),
],
),
migrations.RunPython(
code=django.db.migrations.operations.special.RunPython.noop,
reverse_code=django.db.migrations.operations.special.RunPython.noop,
),
migrations.AlterField(
model_name="mailaccount",
name="imap_port",
field=models.IntegerField(
blank=True,
help_text="This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.",
null=True,
),
),
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, unique=True),
),
migrations.AddField(
model_name="mailrule",
name="order",
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(2, "Move to specified folder"),
(1, "Delete"),
],
default=3,
),
),
migrations.AlterField(
model_name="mailrule",
name="maximum_age",
field=models.PositiveIntegerField(
default=30,
help_text="Specified in days.",
),
),
migrations.AlterModelOptions(
name="mailaccount",
options={
"verbose_name": "mail account",
"verbose_name_plural": "mail accounts",
},
),
migrations.AlterModelOptions(
name="mailrule",
options={"verbose_name": "mail rule", "verbose_name_plural": "mail rules"},
),
migrations.AlterField(
model_name="mailaccount",
name="imap_port",
field=models.IntegerField(
blank=True,
help_text="This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.",
null=True,
verbose_name="IMAP port",
),
),
migrations.AlterField(
model_name="mailaccount",
name="imap_security",
field=models.PositiveIntegerField(
choices=[(1, "No encryption"), (2, "Use SSL"), (3, "Use STARTTLS")],
default=2,
verbose_name="IMAP security",
),
),
migrations.AlterField(
model_name="mailaccount",
name="imap_server",
field=models.CharField(max_length=256, verbose_name="IMAP server"),
),
migrations.AlterField(
model_name="mailaccount",
name="name",
field=models.CharField(max_length=256, unique=True, verbose_name="name"),
),
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.CharField(max_length=256, verbose_name="password"),
),
migrations.AlterField(
model_name="mailaccount",
name="username",
field=models.CharField(max_length=256, verbose_name="username"),
),
migrations.AlterField(
model_name="mailrule",
name="account",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="rules",
to="paperless_mail.mailaccount",
verbose_name="account",
),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(2, "Move to specified folder"),
(1, "Delete"),
],
default=3,
verbose_name="action",
),
),
migrations.AlterField(
model_name="mailrule",
name="action_parameter",
field=models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action.",
max_length=256,
null=True,
verbose_name="action parameter",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_correspondent",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.correspondent",
verbose_name="assign this correspondent",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_correspondent_from",
field=models.PositiveIntegerField(
choices=[
(1, "Do not assign a correspondent"),
(2, "Use mail address"),
(3, "Use name (or mail address if not available)"),
(4, "Use correspondent selected below"),
],
default=1,
verbose_name="assign correspondent from",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_document_type",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.documenttype",
verbose_name="assign this document type",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_tag",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.tag",
verbose_name="assign this tag",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_title_from",
field=models.PositiveIntegerField(
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
],
default=1,
verbose_name="assign title from",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_body",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter body",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_from",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter from",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_subject",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter subject",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
max_length=256,
verbose_name="folder",
),
),
migrations.AlterField(
model_name="mailrule",
name="maximum_age",
field=models.PositiveIntegerField(
default=30,
help_text="Specified in days.",
verbose_name="maximum age",
),
),
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, unique=True, verbose_name="name"),
),
migrations.AlterField(
model_name="mailrule",
name="order",
field=models.IntegerField(default=0, verbose_name="order"),
),
migrations.AddField(
model_name="mailrule",
name="attachment_type",
field=models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(2, "Process all files, including 'inline' attachments."),
],
default=1,
help_text="Inline attachments include embedded images, so it's best to combine this option with a filename filter.",
verbose_name="attachment type",
),
),
migrations.AddField(
model_name="mailrule",
name="filter_attachment_filename",
field=models.CharField(
blank=True,
help_text="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename",
),
),
migrations.AddField(
model_name="mailaccount",
name="character_set",
field=models.CharField(
default="UTF-8",
help_text="The character set to use when communicating with the mail server, such as 'UTF-8' or 'US-ASCII'.",
max_length=256,
verbose_name="character set",
),
),
migrations.AlterField(
model_name="mailrule",
name="action_parameter",
field=models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action. Subfolders must be separated by dots.",
max_length=256,
null=True,
verbose_name="action parameter",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
help_text="Subfolders must be separated by dots.",
max_length=256,
verbose_name="folder",
),
),
migrations.AddField(
model_name="mailrule",
name="assign_tags",
field=models.ManyToManyField(
blank=True,
related_name="mail_rules_multi",
to="documents.tag",
verbose_name="assign this tag",
),
),
]

View File

@@ -1,12 +0,0 @@
# Generated by Django 3.1.3 on 2020-11-17 13:34
from django.db import migrations
from django.db.migrations import RunPython
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0001_initial"),
]
operations = [RunPython(migrations.RunPython.noop, migrations.RunPython.noop)]

View File

@@ -1,27 +0,0 @@
# Generated by Django 3.1.3 on 2020-11-18 19:40
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0002_auto_20201117_1334"),
]
operations = [
migrations.AlterField(
model_name="mailaccount",
name="imap_port",
field=models.IntegerField(
blank=True,
help_text="This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.",
null=True,
),
),
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, unique=True),
),
]

View File

@@ -1,18 +0,0 @@
# Generated by Django 3.1.3 on 2020-11-21 21:51
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0003_auto_20201118_1940"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="order",
field=models.IntegerField(default=0),
),
]

View File

@@ -1,34 +0,0 @@
# Generated by Django 3.1.3 on 2020-11-22 10:36
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0004_mailrule_order"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(2, "Move to specified folder"),
(1, "Delete"),
],
default=3,
),
),
migrations.AlterField(
model_name="mailrule",
name="maximum_age",
field=models.PositiveIntegerField(
default=30,
help_text="Specified in days.",
),
),
]

View File

@@ -1,217 +0,0 @@
# Generated by Django 3.1.4 on 2021-01-01 23:40
import django.db.models.deletion
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("documents", "1011_auto_20210101_2340"),
("paperless_mail", "0005_help_texts"),
]
operations = [
migrations.AlterModelOptions(
name="mailaccount",
options={
"verbose_name": "mail account",
"verbose_name_plural": "mail accounts",
},
),
migrations.AlterModelOptions(
name="mailrule",
options={"verbose_name": "mail rule", "verbose_name_plural": "mail rules"},
),
migrations.AlterField(
model_name="mailaccount",
name="imap_port",
field=models.IntegerField(
blank=True,
help_text="This is usually 143 for unencrypted and STARTTLS connections, and 993 for SSL connections.",
null=True,
verbose_name="IMAP port",
),
),
migrations.AlterField(
model_name="mailaccount",
name="imap_security",
field=models.PositiveIntegerField(
choices=[(1, "No encryption"), (2, "Use SSL"), (3, "Use STARTTLS")],
default=2,
verbose_name="IMAP security",
),
),
migrations.AlterField(
model_name="mailaccount",
name="imap_server",
field=models.CharField(max_length=256, verbose_name="IMAP server"),
),
migrations.AlterField(
model_name="mailaccount",
name="name",
field=models.CharField(max_length=256, unique=True, verbose_name="name"),
),
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.CharField(max_length=256, verbose_name="password"),
),
migrations.AlterField(
model_name="mailaccount",
name="username",
field=models.CharField(max_length=256, verbose_name="username"),
),
migrations.AlterField(
model_name="mailrule",
name="account",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="rules",
to="paperless_mail.mailaccount",
verbose_name="account",
),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(2, "Move to specified folder"),
(1, "Delete"),
],
default=3,
verbose_name="action",
),
),
migrations.AlterField(
model_name="mailrule",
name="action_parameter",
field=models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action.",
max_length=256,
null=True,
verbose_name="action parameter",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_correspondent",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.correspondent",
verbose_name="assign this correspondent",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_correspondent_from",
field=models.PositiveIntegerField(
choices=[
(1, "Do not assign a correspondent"),
(2, "Use mail address"),
(3, "Use name (or mail address if not available)"),
(4, "Use correspondent selected below"),
],
default=1,
verbose_name="assign correspondent from",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_document_type",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.documenttype",
verbose_name="assign this document type",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_tag",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="documents.tag",
verbose_name="assign this tag",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_title_from",
field=models.PositiveIntegerField(
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
],
default=1,
verbose_name="assign title from",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_body",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter body",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_from",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter from",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_subject",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter subject",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
max_length=256,
verbose_name="folder",
),
),
migrations.AlterField(
model_name="mailrule",
name="maximum_age",
field=models.PositiveIntegerField(
default=30,
help_text="Specified in days.",
verbose_name="maximum age",
),
),
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, unique=True, verbose_name="name"),
),
migrations.AlterField(
model_name="mailrule",
name="order",
field=models.IntegerField(default=0, verbose_name="order"),
),
]

View File

@@ -1,37 +0,0 @@
# Generated by Django 3.1.5 on 2021-01-06 01:38
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0006_auto_20210101_2340"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="attachment_type",
field=models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(2, "Process all files, including 'inline' attachments."),
],
default=1,
help_text="Inline attachments include embedded images, so it's best to combine this option with a filename filter.",
verbose_name="attachment type",
),
),
migrations.AddField(
model_name="mailrule",
name="filter_attachment_filename",
field=models.CharField(
blank=True,
help_text="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename",
),
),
]

View File

@@ -1,44 +0,0 @@
# Generated by Django 3.2.3 on 2021-05-16 09:40
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0007_auto_20210106_0138"),
]
operations = [
migrations.AddField(
model_name="mailaccount",
name="character_set",
field=models.CharField(
default="UTF-8",
help_text="The character set to use when communicating with the mail server, such as 'UTF-8' or 'US-ASCII'.",
max_length=256,
verbose_name="character set",
),
),
migrations.AlterField(
model_name="mailrule",
name="action_parameter",
field=models.CharField(
blank=True,
help_text="Additional parameter for the action selected above, i.e., the target folder of the move to folder action. Subfolders must be separated by dots.",
max_length=256,
null=True,
verbose_name="action parameter",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
help_text="Subfolders must be separated by dots.",
max_length=256,
verbose_name="folder",
),
),
]

View File

@@ -1,37 +0,0 @@
# Generated by Django 4.0.3 on 2022-03-28 17:40
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0008_auto_20210516_0940"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Mark as read, don't process read mails"),
(2, "Flag the mail, don't process flagged mails"),
(3, "Move to specified folder"),
(4, "Delete"),
],
default=3,
verbose_name="action",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
help_text="Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server.",
max_length=256,
verbose_name="folder",
),
),
]

View File

@@ -1,23 +0,0 @@
# Generated by Django 3.2.12 on 2022-03-11 15:00
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0008_auto_20210516_0940"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="assign_tags",
field=models.ManyToManyField(
blank=True,
related_name="mail_rules_multi",
to="documents.Tag",
verbose_name="assign this tag",
),
),
]

View File

@@ -1,39 +0,0 @@
# Generated by Django 3.2.12 on 2022-03-11 15:02
from django.db import migrations
def migrate_tag_to_tags(apps, schema_editor):
# Manual data migration, see
# https://docs.djangoproject.com/en/3.2/topics/migrations/#data-migrations
#
# Copy the assign_tag property to the new assign_tags set if it exists.
MailRule = apps.get_model("paperless_mail", "MailRule")
for mail_rule in MailRule.objects.all():
if mail_rule.assign_tag:
mail_rule.assign_tags.add(mail_rule.assign_tag)
mail_rule.save()
def migrate_tags_to_tag(apps, schema_editor):
# Manual data migration, see
# https://docs.djangoproject.com/en/3.2/topics/migrations/#data-migrations
#
# Copy the unique value in the assign_tags set to the old assign_tag property.
# Do nothing if the tag is not unique.
MailRule = apps.get_model("paperless_mail", "MailRule")
for mail_rule in MailRule.objects.all():
tags = mail_rule.assign_tags.all()
if len(tags) == 1:
mail_rule.assign_tag = tags[0]
mail_rule.save()
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0009_mailrule_assign_tags"),
]
operations = [
migrations.RunPython(migrate_tag_to_tags, migrate_tags_to_tag),
]

View File

@@ -1,16 +0,0 @@
# Generated by Django 3.2.12 on 2022-03-11 15:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0010_auto_20220311_1602"),
]
operations = [
migrations.RemoveField(
model_name="mailrule",
name="assign_tag",
),
]

View File

@@ -1,321 +0,0 @@
# Generated by Django 4.2.13 on 2024-06-28 17:47
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
replaces = [
("paperless_mail", "0011_remove_mailrule_assign_tag"),
("paperless_mail", "0012_alter_mailrule_assign_tags"),
("paperless_mail", "0009_alter_mailrule_action_alter_mailrule_folder"),
("paperless_mail", "0013_merge_20220412_1051"),
("paperless_mail", "0014_alter_mailrule_action"),
("paperless_mail", "0015_alter_mailrule_action"),
("paperless_mail", "0016_mailrule_consumption_scope"),
("paperless_mail", "0017_mailaccount_owner_mailrule_owner"),
("paperless_mail", "0018_processedmail"),
("paperless_mail", "0019_mailrule_filter_to"),
("paperless_mail", "0020_mailaccount_is_token"),
("paperless_mail", "0021_alter_mailaccount_password"),
("paperless_mail", "0022_mailrule_assign_owner_from_rule_and_more"),
("paperless_mail", "0023_remove_mailrule_filter_attachment_filename_and_more"),
("paperless_mail", "0024_alter_mailrule_name_and_more"),
]
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("paperless_mail", "0010_auto_20220311_1602"),
]
operations = [
migrations.RemoveField(
model_name="mailrule",
name="assign_tag",
),
migrations.AlterField(
model_name="mailrule",
name="assign_tags",
field=models.ManyToManyField(
blank=True,
to="documents.tag",
verbose_name="assign this tag",
),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Mark as read, don't process read mails"),
(2, "Flag the mail, don't process flagged mails"),
(3, "Move to specified folder"),
(4, "Delete"),
],
default=3,
verbose_name="action",
),
),
migrations.AlterField(
model_name="mailrule",
name="folder",
field=models.CharField(
default="INBOX",
help_text="Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server.",
max_length=256,
verbose_name="folder",
),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Delete"),
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
],
default=3,
verbose_name="action",
),
),
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Delete"),
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(5, "Tag the mail with specified tag, don't process tagged mails"),
],
default=3,
verbose_name="action",
),
),
migrations.AddField(
model_name="mailrule",
name="consumption_scope",
field=models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(
2,
"Process full Mail (with embedded attachments in file) as .eml",
),
(
3,
"Process full Mail (with embedded attachments in file) as .eml + process attachments as separate documents",
),
],
default=1,
verbose_name="consumption scope",
),
),
migrations.AddField(
model_name="mailaccount",
name="owner",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
migrations.AddField(
model_name="mailrule",
name="owner",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
migrations.CreateModel(
name="ProcessedMail",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"folder",
models.CharField(
editable=False,
max_length=256,
verbose_name="folder",
),
),
(
"uid",
models.CharField(
editable=False,
max_length=256,
verbose_name="uid",
),
),
(
"subject",
models.CharField(
editable=False,
max_length=256,
verbose_name="subject",
),
),
(
"received",
models.DateTimeField(editable=False, verbose_name="received"),
),
(
"processed",
models.DateTimeField(
default=django.utils.timezone.now,
editable=False,
verbose_name="processed",
),
),
(
"status",
models.CharField(
editable=False,
max_length=256,
verbose_name="status",
),
),
(
"error",
models.TextField(
blank=True,
editable=False,
null=True,
verbose_name="error",
),
),
(
"owner",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
(
"rule",
models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
to="paperless_mail.mailrule",
),
),
],
options={
"abstract": False,
},
),
migrations.AddField(
model_name="mailrule",
name="filter_to",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter to",
),
),
migrations.AddField(
model_name="mailaccount",
name="is_token",
field=models.BooleanField(
default=False,
verbose_name="Is token authentication",
),
),
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.CharField(max_length=2048, verbose_name="password"),
),
migrations.AddField(
model_name="mailrule",
name="assign_owner_from_rule",
field=models.BooleanField(
default=True,
verbose_name="Assign the rule owner to documents",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_title_from",
field=models.PositiveIntegerField(
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
(3, "Do not assign title from rule"),
],
default=1,
verbose_name="assign title from",
),
),
migrations.RenameField(
model_name="mailrule",
old_name="filter_attachment_filename",
new_name="filter_attachment_filename_include",
),
migrations.AddField(
model_name="mailrule",
name="filter_attachment_filename_exclude",
field=models.CharField(
blank=True,
help_text="Do not consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename exclusive",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_attachment_filename_include",
field=models.CharField(
blank=True,
help_text="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename inclusive",
),
),
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, verbose_name="name"),
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
fields=("name", "owner"),
name="paperless_mail_mailrule_unique_name_owner",
),
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
condition=models.Q(("owner__isnull", True)),
fields=("name",),
name="paperless_mail_mailrule_name_unique",
),
),
]

View File

@@ -1,22 +0,0 @@
# Generated by Django 3.2.12 on 2022-03-11 16:21
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0011_remove_mailrule_assign_tag"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="assign_tags",
field=models.ManyToManyField(
blank=True,
to="documents.Tag",
verbose_name="assign this tag",
),
),
]

View File

@@ -1,12 +0,0 @@
# Generated by Django 4.0.4 on 2022-04-12 08:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0009_alter_mailrule_action_alter_mailrule_folder"),
("paperless_mail", "0012_alter_mailrule_assign_tags"),
]
operations = []

View File

@@ -1,27 +0,0 @@
# Generated by Django 4.0.4 on 2022-04-18 22:57
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0013_merge_20220412_1051"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Delete"),
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
],
default=3,
verbose_name="action",
),
),
]

View File

@@ -1,28 +0,0 @@
# Generated by Django 4.0.4 on 2022-05-29 13:21
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0014_alter_mailrule_action"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="action",
field=models.PositiveIntegerField(
choices=[
(1, "Delete"),
(2, "Move to specified folder"),
(3, "Mark as read, don't process read mails"),
(4, "Flag the mail, don't process flagged mails"),
(5, "Tag the mail with specified tag, don't process tagged mails"),
],
default=3,
verbose_name="action",
),
),
]

View File

@@ -1,32 +0,0 @@
# Generated by Django 4.0.4 on 2022-07-11 22:02
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0015_alter_mailrule_action"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="consumption_scope",
field=models.PositiveIntegerField(
choices=[
(1, "Only process attachments."),
(
2,
"Process full Mail (with embedded attachments in file) as .eml",
),
(
3,
"Process full Mail (with embedded attachments in file) as .eml + process attachments as separate documents",
),
],
default=1,
verbose_name="consumption scope",
),
),
]

View File

@@ -1,38 +0,0 @@
# Generated by Django 4.1.3 on 2022-12-06 04:48
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("paperless_mail", "0016_mailrule_consumption_scope"),
]
operations = [
migrations.AddField(
model_name="mailaccount",
name="owner",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
migrations.AddField(
model_name="mailrule",
name="owner",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
]

View File

@@ -1,105 +0,0 @@
# Generated by Django 4.1.5 on 2023-03-03 18:38
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("paperless_mail", "0017_mailaccount_owner_mailrule_owner"),
]
operations = [
migrations.CreateModel(
name="ProcessedMail",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"folder",
models.CharField(
editable=False,
max_length=256,
verbose_name="folder",
),
),
(
"uid",
models.CharField(
editable=False,
max_length=256,
verbose_name="uid",
),
),
(
"subject",
models.CharField(
editable=False,
max_length=256,
verbose_name="subject",
),
),
(
"received",
models.DateTimeField(editable=False, verbose_name="received"),
),
(
"processed",
models.DateTimeField(
default=django.utils.timezone.now,
editable=False,
verbose_name="processed",
),
),
(
"status",
models.CharField(
editable=False,
max_length=256,
verbose_name="status",
),
),
(
"error",
models.TextField(
blank=True,
editable=False,
null=True,
verbose_name="error",
),
),
(
"owner",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
(
"rule",
models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
to="paperless_mail.mailrule",
),
),
],
options={
"abstract": False,
},
),
]

View File

@@ -1,23 +0,0 @@
# Generated by Django 4.1.7 on 2023-03-11 21:08
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0018_processedmail"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="filter_to",
field=models.CharField(
blank=True,
max_length=256,
null=True,
verbose_name="filter to",
),
),
]

View File

@@ -1,21 +0,0 @@
# Generated by Django 4.1.7 on 2023-03-22 17:51
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0019_mailrule_filter_to"),
]
operations = [
migrations.AddField(
model_name="mailaccount",
name="is_token",
field=models.BooleanField(
default=False,
verbose_name="Is token authentication",
),
),
]

View File

@@ -1,18 +0,0 @@
# Generated by Django 4.1.7 on 2023-04-20 15:03
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0020_mailaccount_is_token"),
]
operations = [
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.CharField(max_length=2048, verbose_name="password"),
),
]

View File

@@ -1,34 +0,0 @@
# Generated by Django 4.1.11 on 2023-09-18 18:50
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0021_alter_mailaccount_password"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="assign_owner_from_rule",
field=models.BooleanField(
default=True,
verbose_name="Assign the rule owner to documents",
),
),
migrations.AlterField(
model_name="mailrule",
name="assign_title_from",
field=models.PositiveIntegerField(
choices=[
(1, "Use subject as title"),
(2, "Use attachment filename as title"),
(3, "Do not assign title from rule"),
],
default=1,
verbose_name="assign title from",
),
),
]

View File

@@ -1,40 +0,0 @@
# Generated by Django 4.2.7 on 2023-12-04 03:06
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0022_mailrule_assign_owner_from_rule_and_more"),
]
operations = [
migrations.RenameField(
model_name="mailrule",
old_name="filter_attachment_filename",
new_name="filter_attachment_filename_include",
),
migrations.AddField(
model_name="mailrule",
name="filter_attachment_filename_exclude",
field=models.CharField(
blank=True,
help_text="Do not consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename exclusive",
),
),
migrations.AlterField(
model_name="mailrule",
name="filter_attachment_filename_include",
field=models.CharField(
blank=True,
help_text="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive.",
max_length=256,
null=True,
verbose_name="filter attachment filename inclusive",
),
),
]

View File

@@ -1,33 +0,0 @@
# Generated by Django 4.2.11 on 2024-06-05 16:51
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0023_remove_mailrule_filter_attachment_filename_and_more"),
]
operations = [
migrations.AlterField(
model_name="mailrule",
name="name",
field=models.CharField(max_length=256, verbose_name="name"),
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
fields=("name", "owner"),
name="paperless_mail_mailrule_unique_name_owner",
),
),
migrations.AddConstraint(
model_name="mailrule",
constraint=models.UniqueConstraint(
condition=models.Q(("owner__isnull", True)),
fields=("name",),
name="paperless_mail_mailrule_name_unique",
),
),
]

View File

@@ -1,52 +0,0 @@
# Generated by Django 4.2.13 on 2024-07-09 16:39
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("paperless_mail", "0024_alter_mailrule_name_and_more"),
]
operations = [
migrations.AlterField(
model_name="mailaccount",
name="owner",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
migrations.AlterField(
model_name="mailrule",
name="owner",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
migrations.AlterField(
model_name="processedmail",
name="owner",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to=settings.AUTH_USER_MODEL,
verbose_name="owner",
),
),
]

View File

@@ -1,21 +0,0 @@
# Generated by Django 5.1.1 on 2024-09-30 15:17
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
(
"paperless_mail",
"0025_alter_mailaccount_owner_alter_mailrule_owner_and_more",
),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="enabled",
field=models.BooleanField(default=True, verbose_name="enabled"),
),
]

View File

@@ -1,48 +0,0 @@
# Generated by Django 5.1.1 on 2024-10-05 17:12
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0026_mailrule_enabled"),
]
operations = [
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.CharField(max_length=3072, verbose_name="password"),
),
migrations.AddField(
model_name="mailaccount",
name="expiration",
field=models.DateTimeField(
blank=True,
help_text="The expiration date of the refresh token. ",
null=True,
verbose_name="expiration",
),
),
migrations.AddField(
model_name="mailaccount",
name="account_type",
field=models.PositiveIntegerField(
choices=[(1, "IMAP"), (2, "Gmail OAuth"), (3, "Outlook OAuth")],
default=1,
verbose_name="account type",
),
),
migrations.AddField(
model_name="mailaccount",
name="refresh_token",
field=models.CharField(
blank=True,
help_text="The refresh token to use for token authentication e.g. with oauth2.",
max_length=3072,
null=True,
verbose_name="refresh token",
),
),
]

View File

@@ -1,31 +0,0 @@
# Generated by Django 5.1.1 on 2024-10-30 04:31
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
(
"paperless_mail",
"0027_mailaccount_expiration_mailaccount_account_type_and_more",
),
]
operations = [
migrations.AlterField(
model_name="mailaccount",
name="password",
field=models.TextField(verbose_name="password"),
),
migrations.AlterField(
model_name="mailaccount",
name="refresh_token",
field=models.TextField(
blank=True,
help_text="The refresh token to use for token authentication e.g. with oauth2.",
null=True,
verbose_name="refresh token",
),
),
]

View File

@@ -1,28 +0,0 @@
# Generated by Django 5.1.3 on 2024-11-24 12:39
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("paperless_mail", "0028_alter_mailaccount_password_and_more"),
]
operations = [
migrations.AddField(
model_name="mailrule",
name="pdf_layout",
field=models.PositiveIntegerField(
choices=[
(0, "System default"),
(1, "Text, then HTML"),
(2, "HTML, then text"),
(3, "HTML only"),
(4, "Text only"),
],
default=0,
verbose_name="pdf layout",
),
),
]