diff options
| author | Tim Graham <timograham@gmail.com> | 2014-04-17 20:21:22 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-17 20:36:52 -0400 |
| commit | a4acb804634af17cfd9ee7070ec3865d7cc2a7a3 (patch) | |
| tree | dc0429ef3cd686b183eef57d16caec5c12569e33 /docs/howto/initial-data.txt | |
| parent | 11e30b684d1a74bf7cc3b3bd22c0ffbdaa28f0a0 (diff) | |
Fixed #22444 -- Marked initial SQL/fixture loading as deprecated.
Thanks Karen Tracey for the report.
Diffstat (limited to 'docs/howto/initial-data.txt')
| -rw-r--r-- | docs/howto/initial-data.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/howto/initial-data.txt b/docs/howto/initial-data.txt index d003db6497..d55cd38609 100644 --- a/docs/howto/initial-data.txt +++ b/docs/howto/initial-data.txt @@ -77,6 +77,13 @@ again, you'll wipe out any changes you've made. Automatically loading initial data fixtures ------------------------------------------- +.. deprecated:: 1.7 + + If an application uses migrations, there is no automatic loading of + fixtures. Since migrations will be required for applications in Django 1.9, + this behavior is considered deprecated. If you want to load initial data + for an app, consider doing it in a migration. + If you create a fixture named ``initial_data.[xml/yaml/json]``, that fixture will be loaded every time you run :djadmin:`migrate`. This is extremely convenient, but be careful: remember that the data will be refreshed *every time* you run @@ -103,6 +110,13 @@ directories. Providing initial SQL data ========================== +.. deprecated:: 1.7 + + If an application uses migrations, there is no loading of initial SQL data + (including backend-specific SQL data). Since migrations will be required + for applications in Django 1.9, this behavior is considered deprecated. + If you want to use initial SQL for an app, consider doing it in a migration. + Django provides a hook for passing the database arbitrary SQL that's executed just after the CREATE TABLE statements when you run :djadmin:`migrate`. You can use this hook to populate default records, or you could also create SQL |
