Author: mtredinnick Date: 2007-07-14 00:27:22 -0500 (Sat, 14 Jul 2007) New Revision: 5692
Modified: django/trunk/docs/django-admin.txt Log: Fixed #4869 -- Added a note that syncdb does not alter existing tables. Thanks, James Bennett. Modified: django/trunk/docs/django-admin.txt =================================================================== --- django/trunk/docs/django-admin.txt 2007-07-13 21:20:07 UTC (rev 5691) +++ django/trunk/docs/django-admin.txt 2007-07-14 05:27:22 UTC (rev 5692) @@ -400,6 +400,19 @@ might be in ``INSTALLED_APPS`` by default. When you start a new project, run this command to install the default apps. +.. admonition:: Syncdb will not alter existing tables + + ``syncdb`` will only create tables for models which have not yet been + installed. It will *never* issue ``ALTER TABLE`` statements to match + changes made to a model class after installation. Changes to model classes + and database schemas often involve some form of ambiguity and, in those + cases, Django would have to guess at the correct changes to make. There is + a risk that critical data would be lost in the process. + + If you have made changes to a model and wish to alter the database tables + to match, use the ``sql`` command to display the new SQL structure and + compare that to your existing table schema to work out the changes. + If you're installing the ``django.contrib.auth`` application, ``syncdb`` will give you the option of creating a superuser immediately. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
