Extend action_forward feature to include route info

This commit is contained in:
Kijin Sung 2020-06-17 15:52:06 +09:00
parent a08ec31f2b
commit 5dcb0d332b
4 changed files with 30 additions and 3 deletions

View file

@ -131,6 +131,11 @@ class module extends ModuleObject
{
return true;
}
// check route columns in action_forward table
if(!$oDB->isColumnExists('action_forward', 'route_method')) return true;
if(!$oDB->isColumnExists('action_forward', 'route_regexp')) return true;
if(!$oDB->isColumnExists('action_forward', 'route_config')) return true;
}
/**
@ -448,6 +453,20 @@ class module extends ModuleObject
$oDB->addIndex('module_part_config', 'unique_module_part_config', array('module', 'module_srl'), false);
}
}
// check route columns in action_forward table
if(!$oDB->isColumnExists('action_forward', 'route_method'))
{
$oDB->addColumn('action_forward', 'route_method', 'varchar', 30);
}
if(!$oDB->isColumnExists('action_forward', 'route_regexp'))
{
$oDB->addColumn('action_forward', 'route_regexp', 'varchar', 180);
}
if(!$oDB->isColumnExists('action_forward', 'route_config'))
{
$oDB->addColumn('action_forward', 'route_config', 'text');
}
}
/**