Update and clean up database schema