Skip to content


Subversion checkout URL

You can clone with
Download ZIP


sqlite and migrations (south) problem #213

mfa opened this Issue · 9 comments

7 participants


File "cms/migrations/", line 11, in forwards
db.add_column('cms_publicpage', 'changed_by', orm['cms.publicpage:changed_by'])
File "south/db/", line 20, in add_column
raise ValueError("You cannot add a null=False column without a default value.")
ValueError: You cannot add a null=False column without a default value.


how is the support for sqllite in south nowadays? if you define a default value... does everything else run?


I first used sqlite with django-cms-2.0 and had no problems. but without using south.
because of the recent changes I had to use south/migrations. this seems not to work atm with sqlite :(
so this bug is maybe a south-issue, but why does all 14 migrations before work smoothly?
So since yesterday I'm using postgres to run my testsite with django-cms-2.0.


could you check with RC3 if this works with sqllite?


I can confirm that the problem is still there for sqlite with the rc3


I had (what looks to me), like a slightly different manifestation of this problem with the error:

sqlite3.IntegrityError: may not be NULL

I'm trusting that the person who marked my original as a dup is more in-the-know than I.

Is there a simple workaround that I could use for now? Or is the whole notion of using sqlite with south for local development really not a good idea at this juncture?


have a look here for a possible workaround:


This can be easily fixed:

--- a/cms/migrations/
+++ b/cms/migrations/
@@ -112,8 +112,8 @@ class Migration:
     'user': ('models.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
     'cms.publicpage': {
-            'changed_by': ('models.CharField', [], {'max_length': '70'}),
-            'created_by': ('models.CharField', [], {'max_length': '70'}),
+            'changed_by': ('models.CharField', [], {'max_length': '70', 'default': '""'}),
+            'created_by': ('models.CharField', [], {'max_length': '70', 'default': '""'}),
     'author': ('models.ForeignKey', [], {'to': "orm['auth.User']"}),
     'creation_date': ('models.DateTimeField', [], {'default': 'datetime.datetime(2009, 6, 30, 4, 55, 13, 502271)'
     'id': ('models.AutoField', [], {'primary_key': 'True', 'blank': 'True'}),

However this only gets you a little further down the path...


According to the south tutorial you should add a keep_default=False when adding the column:

I have used south on some rather complex sqlite databases without any issues (this was mainly for testing purposes, in production I use mysql or postgres)


3rd party issue, closing

@amarandon amarandon referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.