sandiegopython/test-driven-django-development

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

riseriyo opened this issue · 0 comments

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:

  • Migrating forwards to 0002_auto__add_field_entry_slug.

    blog:0002_auto__add_field_entry_slug

  • Loading initial data for blog.
    Installed 0 object(s) from 0 fixture(s)"