added namespace for created new model,
added method getListByID for new model, added type of object for import method, extends definition tor checkDBTable, fixed typo in parameters of method existsColumn
This commit is contained in:
@ -87,7 +87,7 @@ class Maintenance
|
||||
);
|
||||
}
|
||||
|
||||
public function checkDBTable($table_name, $definition)
|
||||
public function checkDBTable($table_name, $definition, $after_definition = '')
|
||||
{
|
||||
if (strlen($table_name) <= 0) {
|
||||
$this->lastMessage = 'Table ' . strtoupper($table_name) . ' - invalid index';
|
||||
@ -99,7 +99,7 @@ class Maintenance
|
||||
// TEST output
|
||||
$table_name,
|
||||
// FIX query
|
||||
'CREATE TABLE `' . $table_name . '` (' . $definition . ')'
|
||||
'CREATE TABLE `' . $table_name . '` (' . $definition . ') ' . $after_definition
|
||||
);
|
||||
$this->lastMessage = 'Table ' . strtoupper($table_name) . ' (' . $table_name . ')';
|
||||
return $status;
|
||||
@ -146,7 +146,7 @@ class Maintenance
|
||||
|
||||
public function checkDBRetype($table_name, $column, $new_type, $definition)
|
||||
{
|
||||
if (!$this->existsColumn($table_name, $column_old)) {
|
||||
if (!$this->existsColumn($table_name, $column)) {
|
||||
return Maintenance::ABNORMAL;
|
||||
}
|
||||
$status = $this->checkDB(
|
||||
|
||||
Reference in New Issue
Block a user