Modify ↓
Ticket #290 (closed defect: invalid)
adding EmailField fails in sqlite
| Reported by: | preston@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | migrations | Version: | 0.6.2 |
| Keywords: | Cc: |
Description
Not sure how much this is south vs django vs sqlite3
When I create a migration that consists of adding only an EmailField? and try to migrate I get:
sqlite3.OperationalError?: Cannot add a NOT NULL column with default value NULL
adding default= to the field fixes things
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

This is entirely expected; you didn't put null=True in the definition, so in database terms that means that you require some default when you're adding the column. 0.7 and above will have a startmigration that detects this for you and prompts you for the default value you want.