Fixed #21031 -- Updated schema migrations FAQ.
Thanks ramiro for the report.
This commit is contained in:
parent
b66a51ad54
commit
32e40bbe71
|
@ -40,17 +40,13 @@ Yes. See :doc:`Integrating with a legacy database </howto/legacy-databases>`.
|
||||||
If I make changes to a model, how do I update the database?
|
If I make changes to a model, how do I update the database?
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
Take a look at Django's support for :mod:`schema migrations
|
||||||
|
<django.db.migrations>`.
|
||||||
|
|
||||||
If you don't mind clearing data, your project's ``manage.py`` utility has a
|
If you don't mind clearing data, your project's ``manage.py`` utility has a
|
||||||
:djadmin:`flush` option to reset the database to the state it was in
|
:djadmin:`flush` option to reset the database to the state it was in
|
||||||
immediately after :djadmin:`syncdb` was executed.
|
immediately after :djadmin:`syncdb` was executed.
|
||||||
|
|
||||||
If you do care about deleting data, you'll have to execute the ``ALTER TABLE``
|
|
||||||
statements manually in your database.
|
|
||||||
|
|
||||||
There are `external projects which handle schema updates
|
|
||||||
<http://www.djangopackages.com/grids/g/database-migration/>`_, of which the current
|
|
||||||
defacto standard is `south <http://south.aeracode.org/>`_.
|
|
||||||
|
|
||||||
Do Django models support multiple-column primary keys?
|
Do Django models support multiple-column primary keys?
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue