mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
updating schema generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5969 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
4e4fd05034
commit
431f2c2a88
2 changed files with 4 additions and 3 deletions
|
@ -97,8 +97,6 @@ class SchemaShell extends Shell {
|
|||
$options = array('models' => false);
|
||||
}
|
||||
|
||||
$content = $this->Schema->read($options);
|
||||
|
||||
$snapshot = false;
|
||||
if (isset($this->args[0]) && $this->args[0] === 'snapshot') {
|
||||
$snapshot = true;
|
||||
|
@ -115,7 +113,9 @@ class SchemaShell extends Shell {
|
|||
}
|
||||
}
|
||||
|
||||
$content = $this->Schema->read($options);
|
||||
$content['file'] = 'schema.php';
|
||||
|
||||
if($snapshot === true) {
|
||||
$Folder =& new Folder($this->Schema->path);
|
||||
$result = $Folder->read();
|
||||
|
|
|
@ -173,7 +173,8 @@ class CakeSchema extends Object {
|
|||
if (isset($db->config['prefix'])) {
|
||||
$prefix = $db->config['prefix'];
|
||||
}
|
||||
if (empty($models) && $models !== false) {
|
||||
|
||||
if (!is_array($models) && $models !== false) {
|
||||
$models = Configure::listObjects('model');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue