mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #21479 -- Favor 'migrate' over 'syncdb' in the docs.
This commit is contained in:
committed by
Baptiste Mispelon
parent
b6a6cf4ab7
commit
27f04e79b1
@@ -676,8 +676,9 @@ For example::
|
||||
def get_internal_type(self):
|
||||
return 'CharField'
|
||||
|
||||
No matter which database backend we are using, this will mean that ``syncdb``
|
||||
and other SQL commands create the right column type for storing a string.
|
||||
No matter which database backend we are using, this will mean that
|
||||
:djadmin:`migrate` and other SQL commands create the right column type for
|
||||
storing a string.
|
||||
|
||||
If :meth:`.get_internal_type` returns a string that is not known to Django for
|
||||
the database backend you are using -- that is, it doesn't appear in
|
||||
|
||||
@@ -78,9 +78,9 @@ Automatically loading initial data fixtures
|
||||
-------------------------------------------
|
||||
|
||||
If you create a fixture named ``initial_data.[xml/yaml/json]``, that fixture will
|
||||
be loaded every time you run :djadmin:`syncdb`. This is extremely convenient,
|
||||
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
|
||||
:djadmin:`syncdb`. So don't use ``initial_data`` for data you'll want to edit.
|
||||
:djadmin:`migrate`. So don't use ``initial_data`` for data you'll want to edit.
|
||||
|
||||
Where Django finds fixture files
|
||||
--------------------------------
|
||||
@@ -104,7 +104,7 @@ Providing initial SQL data
|
||||
==========================
|
||||
|
||||
Django provides a hook for passing the database arbitrary SQL that's executed
|
||||
just after the CREATE TABLE statements when you run :djadmin:`syncdb`. You can
|
||||
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
|
||||
functions, views, triggers, etc.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user