sandiegopython / test-driven-django-development

This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
http://test-driven-django-development.readthedocs.org/
Other
102 stars 35 forks source link

Explain possible prompt after "python manage.py schemamigration blog --auto" #125

Open riseriyo opened 10 years ago

riseriyo commented 10 years ago

Explain the following if a reader is prompted with statements after having run the command

"$ python manage.py schemamigration blog --auto ? The field 'Entry.slug' does not have a default specified, yet is NOT NULL. ? Since you are adding this field, you MUST specify a default ? value to use for existing rows. Would you like to: ? 1. Quit now, and add a default to the field in models.py ? 2. Specify a one-off value to use for existing columns now"

I added the prompt's suggestion by adding datetime.date.today() and then was prompted again to migrate the blog app: "$ python manage.py migrate blog Running migrations for blog: