mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
Gateways: virtualize dpinger defaults during migration
This commit is contained in:
parent
2fb2ae85fd
commit
46eb2c0194
@ -74,6 +74,14 @@ class M1_0_0 extends BaseModelMigration
|
||||
$node->$key = (string)$value;
|
||||
}
|
||||
|
||||
// set, but do not persist default values
|
||||
foreach (Gateways::getDpingerDefaults() as $key => $value) {
|
||||
if (empty((string)$node->$key)) {
|
||||
$node->$key = $value;
|
||||
$node->$key->setInternalIsVirtual(true);
|
||||
}
|
||||
}
|
||||
|
||||
// increase time period if old model had it set too low
|
||||
$min_time_period = 2 * (intval((string)$node->interval) + intval((string)$node->loss_interval));
|
||||
if ((string)$node->time_period < $min_time_period) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user