Merge pull request #1223 from ae-utbm/sale-date-index

Add index on `Selling.date`
This commit is contained in:
thomas girod
2025-11-07 14:55:32 +01:00
committed by GitHub
6 changed files with 47 additions and 41 deletions

View File

@@ -0,0 +1,15 @@
# Generated by Django 5.2.3 on 2025-11-05 08:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("counter", "0033_invoicecall")]
operations = [
migrations.AlterField(
model_name="selling",
name="date",
field=models.DateTimeField(db_index=True, verbose_name="date"),
),
]

View File

@@ -849,7 +849,7 @@ class Selling(models.Model):
blank=False,
on_delete=models.SET_NULL,
)
date = models.DateTimeField(_("date"))
date = models.DateTimeField(_("date"), db_index=True)
payment_method = models.CharField(
_("payment method"),
max_length=255,