From fc6cd29e846b139ef5c76736325b6058a85c3e75 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 14 Jan 2018 14:30:13 +0100 Subject: [PATCH] * revalidate cache before upgrading db --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index ca0ae389..18f35792 100644 --- a/index.php +++ b/index.php @@ -182,6 +182,7 @@ $tmp = ''; if(fetchDatabaseConfig('database_version', $tmp)) { // we got version $tmp = (int)$tmp; if($tmp < DATABASE_VERSION) { // import if older + $db->revalidateCache(); for($i = $tmp + 1; $i <= DATABASE_VERSION; $i++) { require(SYSTEM . 'migrations/' . $i . '.php'); updateDatabaseConfig('database_version', $i); @@ -190,6 +191,7 @@ if(fetchDatabaseConfig('database_version', $tmp)) { // we got version } else { // register first version registerDatabaseConfig('database_version', 0); + $db->revalidateCache(); for($i = 1; $i <= DATABASE_VERSION; $i++) { require(SYSTEM . 'migrations/' . $i . '.php'); updateDatabaseConfig('database_version', $i);