Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added 'If I make changes to a model, how do I update the database?' t…

…o the FAQ

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8c83f2ab300c82e7856da3bf6bcdaf087f89e80d 1 parent 8da42a8
@adrianholovaty adrianholovaty authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 docs/faq.txt
17 docs/faq.txt
@@ -266,6 +266,23 @@ Using a ``FileField`` or an ``ImageField`` in a model takes a few steps:
absolute URL to your image in a template with
``{{ object.get_mug_shot_url }}``.
+If I make changes to a model, how do I update the database?
+If you don't care about clearing data, just do this::
+ sqlreset appname | psql dbname
+That "psql" assumes you're using PostgreSQL. If you're using MySQL, use the
+appropriate command-line utility, ``mysql``.
+If you do care about deleting data, you'll have to execute the ``ALTER TABLE``
+statements manually in your database. That's the way we've always done it,
+because dealing with data is a very sensitive operation that we've wanted to
+avoid automating. That said, there's some work being done to add a
+`` updatedb`` command, which would output the necessary
+``ALTER TABLE`` statements, if any.
The database API

0 comments on commit 8c83f2a

Please sign in to comment.
Something went wrong with that request. Please try again.