Fix migrate.sql to update tables much better