/** * Creates SQL diff of two DBSteward XML definition documents * * @return array output files list */ public static function diff_xml($old_xml_file, $new_xml_file, $upgrade_prefix) { $old_database = simplexml_load_file($old_xml_file); if ($old_database === false) { throw new Exception("failed to simplexml_load_file() " . $old_xml_file); } $old_database = xml_parser::sql_format_convert($old_database); $new_database = simplexml_load_file($new_xml_file); if ($new_database === false) { throw new Exception("failed to simplexml_load_file() " . $new_xml_file); } $new_database = xml_parser::sql_format_convert($new_database); pgsql8::diff_doc($old_xml_file, $new_xml_file, $old_database, $new_database, $upgrade_prefix); }