mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix missing prefix when reading table schema.
When using prefixes, table metadata would be lost. Fixes #1522 Signed-off-by: mark_story <mark@mark-story.com> Conflicts: lib/Cake/Model/CakeSchema.php
This commit is contained in:
parent
85ae6846c4
commit
9c4a9bbd06
1 changed files with 6 additions and 3 deletions
|
@ -306,18 +306,21 @@ class CakeSchema extends Object {
|
|||
$systemTables = array(
|
||||
'aros', 'acos', 'aros_acos', Configure::read('Session.table'), 'i18n'
|
||||
);
|
||||
|
||||
$fulltable = $db->fullTableName($Object, false);
|
||||
|
||||
if (in_array($table, $systemTables)) {
|
||||
$tables[$Object->table] = $this->_columns($Object);
|
||||
$tables[$Object->table]['indexes'] = $db->index($Object);
|
||||
$tables[$Object->table]['tableParameters'] = $db->readTableParameters($table);
|
||||
$tables[$Object->table]['tableParameters'] = $db->readTableParameters($fulltable);
|
||||
} elseif ($models === false) {
|
||||
$tables[$table] = $this->_columns($Object);
|
||||
$tables[$table]['indexes'] = $db->index($Object);
|
||||
$tables[$table]['tableParameters'] = $db->readTableParameters($table);
|
||||
$tables[$table]['tableParameters'] = $db->readTableParameters($fulltable);
|
||||
} else {
|
||||
$tables['missing'][$table] = $this->_columns($Object);
|
||||
$tables['missing'][$table]['indexes'] = $db->index($Object);
|
||||
$tables['missing'][$table]['tableParameters'] = $db->readTableParameters($table);
|
||||
$tables['missing'][$table]['tableParameters'] = $db->readTableParameters($fulltable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue