nonZero/hackforisrael — pull request #21 by yoniYalovitsky (2013-11-25 20:22:51+00:00)
Title: fixed migration issue

added a default to fix the lms_useritem.created_at field

the symptom was:

Running migrations for lms:
- Migrating forwards to 0002_auto__add_field_itemcomment_content_html__del_field_trail_created_by__.
> lms:0002_auto__add_field_itemcomment_content_html__del_field_trail_created_by__
FailedDryRun: ! Error found during dry run of '0002_auto__add_field_itemcomment_content_html__del_field_trail_created_by__'! Aborting.
Traceback (most recent call last):
File "/home/yoni/Personal_projects/hack_for_israel/local/lib/python2.7/site-packages/south/migration/migrators.py", line 170, in _run_migration
migration_function()
File "/home/yoni/Personal_projects/hack_for_israel/local/lib/python2.7/site-packages/south/migration/migrators.py", line 59, in
return (lambda: direction(orm))
File "/home/yoni/Personal_projects/hack_for_israel/hackforisrael/src/lms/migrations/0002_auto__add_field_itemcomment_content_html__del_field_trail_created_by__.py", line 36, in forwards
keep_default=False)
File "/home/yoni/Personal_projects/hack_for_israel/local/lib/python2.7/site-packages/south/db/sqlite3.py", line 25, 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.