diff --git a/db/db_update.php b/db/db_update.php index 3a6deb6..1a6f6f2 100644 --- a/db/db_update.php +++ b/db/db_update.php @@ -55,6 +55,15 @@ if($dbcodeversion && $dbdbversion) for($ver=$dbdbversion+1;$ver<=$dbcodeversion;$ver++) { + if(file_exists("db.update.$ver.php")) + { + include("db.update.$ver.php"); + } + if(is_callable("db_update_pre")) { + echo "db.update.$ver.php::db_update_pre() exists - running...\n"; + call_user_func("db_update_pre"); + echo "db.update.$ver.php::db_update_pre() done.\n"; + } if(file_exists("db.update.$ver.sql")) { echo "db.update.$ver.sql detected - running...\n"; @@ -64,7 +73,12 @@ if($dbcodeversion && $dbdbversion) } else { - echo "Version $ver update file not found - skipping over\n"; + echo "Version $ver SQL update file not found - skipping over\n"; + } + if(is_callable("db_update_post")) { + echo "db.update.$ver.php::db_update_post() exists - running...\n"; + call_user_func("db_update_post"); + echo "db.update.$ver.php::db_update_post() done.\n"; } } echo "\nAll done - updating new DB version to $dbcodeversion\n";