Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23512 closed Cleanup/optimization (fixed)

Make migration docs about initial_data fixtures clearer

Reported by: Markus Holtermann Owned by: Ola Sitarska
Component: Documentation Version: 1.7
Severity: Normal Keywords:
Cc: info+coding@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

From @abhillman on IRC:

When migrations are created in Django 1.7, the fixtures are ignored. This is a perfectly fine decision, but many users (such as myself) still need fixture-like functionality. That functionality is provided by RunPython or RunSQL within a migration. While the release notes correctly indicate that modifying/creating a migration can replace initial_data, they could be a little clearer, noting RunPython or RunSQL. For example:

"initial_data fixtures are no longer loaded for apps with migrations; if you want to load initial data for an app, we suggest you do it in a migration."

... could become

"initial_data fixtures are no longer loaded for apps with migrations; if you want to load initial data for an app, we suggest you create a migration for you application and define a RunPython or RunSQL command in the operations section of the migration."

That could be immensely helpful for pointing users in the right direction, especially if they are eager to quickly get django 1.7 up and running... whilst maintaining fixture-like functionality.

Change History (8)

comment:1 by Markus Holtermann, 10 years ago

Cc: info+coding@… added

comment:2 by Tim Graham, 10 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:3 by Tim Graham, 10 years ago

Should also be changed in the 1.7 release notes as described in #23513.

comment:4 by Ola Sitarska, 10 years ago

Owner: changed from nobody to Ola Sitarska
Status: newassigned

comment:6 by Markus Holtermann, 10 years ago

Triage Stage: AcceptedReady for checkin

Thank you Ola. Looks good to me.

comment:7 by Baptiste Mispelon <bmispelon@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 21819e6dbf422fe3ebe23cc006c0ef7bfc5c73de:

Fixed #23512 -- Made migration docs about initial_data clearer

Thanks @abhillman and @Markush2010 for submitting the ticket.

comment:8 by Baptiste Mispelon <bmispelon@…>, 10 years ago

In 99c2e40384ff74755145e05bd12f081316941e81:

[1.7.x] Fixed #23512 -- Made migration docs about initial_data clearer

Thanks @abhillman and @Markush2010 for submitting the ticket.

Backport of 21819e6dbf422fe3ebe23cc006c0ef7bfc5c73de from master.

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