#37151: Add support for squashing across AddIndex, AddConstraint, and
AlterConstraint
-----------------------------------+---------------------------------------
     Reporter:  Markus Holtermann  |                     Type:  New feature
       Status:  new                |                Component:  Migrations
      Version:  6.0                |                 Severity:  Normal
     Keywords:  migrations         |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+---------------------------------------
 The `AddIndex`, `AddConstraint`, and `AlterConstraint` migration
 operations straight out reject squashing across them.

 Let's take the following set of operations:

 {{{
 [
     migrations.CreateModel("A", fields=[("id", models.BigAutoField())]),
     migrations.AddIndex("b", models.Index(fields=["id"], name="b_idx")),
     migrations.AddField("a", "name", models.IntegerField()),
 ]
 }}}
 I would expect to get the following 2 operations:
 {{{
 [
     migrations.AddIndex("b", models.Index(fields=["id"], name="b_idx")),
     migrations.CreateModel("A", fields=[("id", models.BigAutoField()),
 ("name", models.IntegerField())]),
 ]
 }}}
 Instead, I end up with the same set of operations.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37151>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019eabc5c251-3fc7b2e7-bfc0-4ad0-9ca0-8b1f167bcfcd-000000%40eu-central-1.amazonses.com.

Reply via email to