On 3/24/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> (3) At your database prompt ("manage.py shell" and go from there),
> execute "ALTER TABLE ADD COLUMN ... DEFAULT ...", filling in the first
> "..." part with the column definition you noted before. You will also
> need to add a DEFAULT value to the column at the database level so that
> existing entries have a value for that column. If the column can be
> NULL, you won't need the default value -- it will just put NULLs in
> there for all the existing entries.Alternative, and even better in my experience: write a SQL file which will run the update inside a transaction, and commit that into the SVN repo with your app so you have a history of what you've done to the DB. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

