Opened 19 months ago

Last modified 10 months ago

#34534 closed Cleanup/optimization

Reduce index/constraints operations. — at Version 2

Reported by: David Sanders Owned by: nobody
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: bcail Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

From https://github.com/django/django/pull/16819#issuecomment-1529913703

  • RenameIndex can be reduced into AddIndex
  • DropConstraint can be reduced with AddConstraint
  • A question was raised whether constraints could be reduced into create model though some databases do not support deferrable constraints (eg MySQL)
  • It's worth going over the operations to see if there are any other potential reductions to add

Change History (2)

comment:1 by Mariusz Felisiak, 19 months ago

Component: Database layer (models, ORM)Migrations
Easy pickings: unset
Summary: Migration operation optimisationsReduce index/constraints operations.
Triage Stage: UnreviewedAccepted

Thanks for the ticket.

  • It's worth going over the operations to see if there are any other potential reductions to add

This point it too generic. Please open a new ticket when you will find something more. We don't want to keep this ticket to be open forever.

comment:2 by Mariusz Felisiak, 19 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top