Fix Database migration code.