Database migration bug fix.