Skip to content

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

@riseriyo

Description

@riseriyo

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)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions