mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-11 23:59:31 -06:00
Chore: Optimizes the integer fields for choice types mostly, while leaving plenty of room to grow (#12057)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Generated by Django 5.2.11 on 2026-02-09 16:37
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("paperless", "0006_applicationconfiguration_barcode_tag_split"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="applicationconfiguration",
|
||||
name="barcode_dpi",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
null=True,
|
||||
validators=[django.core.validators.MinValueValidator(1)],
|
||||
verbose_name="Sets the barcode DPI",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="applicationconfiguration",
|
||||
name="barcode_max_pages",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
null=True,
|
||||
validators=[django.core.validators.MinValueValidator(1)],
|
||||
verbose_name="Sets the maximum pages for barcode",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="applicationconfiguration",
|
||||
name="image_dpi",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
null=True,
|
||||
validators=[django.core.validators.MinValueValidator(1)],
|
||||
verbose_name="Sets image DPI fallback value",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="applicationconfiguration",
|
||||
name="pages",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
null=True,
|
||||
validators=[django.core.validators.MinValueValidator(1)],
|
||||
verbose_name="Do OCR from page 1 to this value",
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -105,7 +105,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
|
||||
Settings for the Tesseract based OCR parser
|
||||
"""
|
||||
|
||||
pages = models.PositiveIntegerField(
|
||||
pages = models.PositiveSmallIntegerField(
|
||||
verbose_name=_("Do OCR from page 1 to this value"),
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
@@ -134,7 +134,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
|
||||
choices=ArchiveFileChoices.choices,
|
||||
)
|
||||
|
||||
image_dpi = models.PositiveIntegerField(
|
||||
image_dpi = models.PositiveSmallIntegerField(
|
||||
verbose_name=_("Sets image DPI fallback value"),
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
@@ -254,14 +254,14 @@ class ApplicationConfiguration(AbstractSingletonModel):
|
||||
)
|
||||
|
||||
# PAPERLESS_CONSUMER_BARCODE_DPI
|
||||
barcode_dpi = models.PositiveIntegerField(
|
||||
barcode_dpi = models.PositiveSmallIntegerField(
|
||||
verbose_name=_("Sets the barcode DPI"),
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
)
|
||||
|
||||
# PAPERLESS_CONSUMER_BARCODE_MAX_PAGES
|
||||
barcode_max_pages = models.PositiveIntegerField(
|
||||
barcode_max_pages = models.PositiveSmallIntegerField(
|
||||
verbose_name=_("Sets the maximum pages for barcode"),
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
|
||||
Reference in New Issue
Block a user