Ticket #290 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

adding EmailField fails in sqlite

Reported by: preston@… Owned by: andrew
Priority: minor Milestone:
Component: migrations Version: 0.6.2
Keywords: Cc:


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

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Resolution set to invalid

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.

Note: See TracTickets for help on using tickets.