Fix retarted database schema history