Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 9c4a9bbd06c2b88f9ab95678de455fc0a443ee41 1 parent 85ae684
@fiblan fiblan authored markstory committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/Cake/Model/CakeSchema.php
View
9 lib/Cake/Model/CakeSchema.php
@@ -306,18 +306,21 @@ public function read($options = array()) {
$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);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.