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);