Opened 11 months ago

Closed 8 months ago

Last modified 8 months ago

#28784 closed Cleanup/optimization (fixed)

Clarify migrate --fake documentation

Reported by: Ramez Kabbani Owned by: Senthil
Component: Documentation Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

migrate documentation implies that running migrate --fake on a specific migration toggles its applied status (applied => unapplied and vice versa). The reality is that one needs to run migrate --fake on the preceding migration to mark the migration as unapplied.

Change History (8)

comment:1 Changed 11 months ago by Tomer Chachamu

Triage Stage: UnreviewedAccepted

Agreed it could be clearer.

comment:2 Changed 11 months ago by tothegump

What about:
Tells Django to mark the migrations before and including this <migrationname> as having been applied, meanwhile mark the migrations after this <migrationname> as having been unapplied?

But it is not concise.

comment:3 Changed 11 months ago by gagan trivedi

Owner: changed from nobody to gagan trivedi
Status: newassigned

comment:4 in reply to:  2 Changed 8 months ago by Israel Saeta Pérez

Replying to tothegump:

What about:
Tells Django to mark the migrations before and including this <migrationname> as having been applied, meanwhile mark the migrations after this <migrationname> as having been unapplied?

But it is not concise.

What about:
Tells Django to mark the migrations up to the target one (following the rules described above) as applied, but without actually running the SQL to change your database schema.

IMO the source of confusion could be the or unnaplied in the description. But after having read the behavior rules above for the second argument and the meaning of the word fake itself I believe it is pretty clear.

comment:5 Changed 8 months ago by Senthil

Has patch: set
Owner: changed from gagan trivedi to Senthil

comment:7 Changed 8 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In cbac11f9:

Fixed #28784 -- Clarified how migrate --fake works.

comment:8 Changed 8 months ago by Tim Graham <timograham@…>

In d06381d:

[2.0.x] Fixed #28784 -- Clarified how migrate --fake works.

Backport of cbac11f9624d529809e9bdaa7f4d3ab2c5e93009 from master

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