Update App
Update Database
Latest version
/tmp/current-structure.sql");
// Get the new structure from db.sql
exec("egrep -v 'MariaDB dump|Host:|Server version|Dump completed' db.sql > /tmp/new-structure.sql");
// Compare
exec("diff /tmp/current-structure.sql /tmp/new-structure.sql > /tmp/diff.txt");
$diff = file_get_contents("/tmp/diff.txt");
// Display, if there is a difference
if(!empty($diff)){
echo "
Diff between your database structure and db.sql
";
echo "
$diff
";
}
}
?>