Corrected migrations to not overflow the max datetime.
Merge branch 'ticket/15' into tmp_master