Opened 5 years ago

Closed 4 years ago

#31468 closed New feature (fixed)

Move migration name suggestion from AutoDetector to operation classes

Reported by: Adam Johnson Owned by: Adam Johnson
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: 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

Currently migration automatic names are generated in one method in the autodetector. This does not support all operation types, and has no way of being extended for custom operation types. This logic should be moved to the individual operations classes.

Change History (5)

comment:1 by Adam Johnson, 5 years ago

[PR](https://github.com/django/django/pull/12131)

(I started this one just to add two methods and at Simon's suggestion, it grew.)

comment:2 by Adam Johnson, 5 years ago

Triage Stage: UnreviewedAccepted

Marking as impicitly accepted by previous GitHub review.

comment:3 by Mariusz Felisiak, 4 years ago

Owner: changed from nobody to Adam Johnson
Triage Stage: AcceptedReady for checkin

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 5bd585a:

Refs #31468 -- Added tests for MigrationAutodetector.suggest_name().

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In fa58450:

Fixed #31468 -- Allowed specifying migration filename in Operation.

This adds also suggested filename for many built-in operations.

Note: See TracTickets for help on using tickets.
Back to Top