#22444 closed Bug (fixed)
conflicting docs regarding initial_data loading
Description ¶
https://docs.djangoproject.com/en/dev/releases/1.7/#schema-migrations states "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."
However https://docs.djangoproject.com/en/1.7/howto/initial-data/#automatically-loading-initial-data-fixtures states: "If you create a fixture named initial_data.[xml/yaml/json], that fixture will be loaded every time you run migrate. This is extremely convenient, but be careful: remember that the data will be refreshed every time you run migrate. So don’t use initial_data for data you’ll want to edit."
I'm assuming, given the first statement in the release notes, that the 2nd only applies to applications without migrations? That 2nd citation needs to be updated to make it clear that this ONLY applies to apps without migrations (which may come across rather oddly...run migrate to load your initial data for apps w/out migrations...but I assume that IS the case?)
Change History (6)
comment:1 by , 11 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 11 years ago
Attachment: | 22444.diff added |
---|
comment:2 by , 11 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:3 by , 11 years ago
I believe "Providing initial SQL data" should also be marked as deprecated for the same reasons.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Just did a quick test and indeed, the fixture is not installed if the app uses migrations but it gets installed if the
migrations
folder is removed.