MVC - Exclude migrations for memory models. closes https://github.com/opnsense/core/issues/5843

This commit is contained in:
Ad Schellevis 2022-07-02 20:18:06 +02:00
parent 5cffdd7ef9
commit 816f20f0e5

View File

@ -638,7 +638,9 @@ abstract class BaseModel
*/
public function runMigrations()
{
if (version_compare($this->internal_current_model_version, $this->internal_model_version, '<')) {
if ($this->internal_mountpoint == ':memory:') {
return false;
} elseif (version_compare($this->internal_current_model_version, $this->internal_model_version, '<')) {
$upgradePerfomed = false;
$migObjects = array();
$logger = new Logger(