mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
Revert "mvc: do not migrate unversioned empty model data"
This partially reverts commit 6ed3e4fe8d4c15e3ec902baaed852a9237ff36ca.
This commit is contained in:
parent
8a607e7552
commit
d08e886768
@ -336,11 +336,10 @@ abstract class BaseModel
|
||||
$this->parseXml($model_xml->items, $config_array, $this->internalData);
|
||||
// root may contain a version, store if found
|
||||
if (empty($config_array)) {
|
||||
$this->internal_current_model_version = null;
|
||||
// new node, reset
|
||||
$this->internal_current_model_version = "0.0.0";
|
||||
} elseif (!empty($config_array->attributes()['version'])) {
|
||||
$this->internal_current_model_version = (string)$config_array->attributes()['version'];
|
||||
} else {
|
||||
$this->internal_current_model_version = "0.0.0";
|
||||
}
|
||||
|
||||
// trigger post loading event
|
||||
@ -630,10 +629,7 @@ abstract class BaseModel
|
||||
*/
|
||||
public function runMigrations()
|
||||
{
|
||||
if (
|
||||
$this->internal_current_model_version !== null &&
|
||||
version_compare($this->internal_current_model_version, $this->internal_model_version, '<')
|
||||
) {
|
||||
if (version_compare($this->internal_current_model_version, $this->internal_model_version, '<')) {
|
||||
$upgradePerfomed = false;
|
||||
$migObjects = array();
|
||||
$logger = new Syslog("config", array('option' => LOG_PID, 'facility' => LOG_LOCAL2));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user