merged cleanup_schema