mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
parent
b913fe5303
commit
503bc06c70
1 changed files with 5 additions and 2 deletions
|
@ -169,12 +169,15 @@ class CakeFixtureManager {
|
|||
|
||||
$sources = $db->listSources();
|
||||
$table = $db->config['prefix'] . $fixture->table;
|
||||
$exists = in_array($table, $sources);
|
||||
|
||||
if ($drop && in_array($table, $sources)) {
|
||||
if ($drop && $exists) {
|
||||
$fixture->drop($db);
|
||||
$fixture->create($db);
|
||||
} elseif (!in_array($table, $sources)) {
|
||||
} elseif (!$exists) {
|
||||
$fixture->create($db);
|
||||
} else {
|
||||
$fixture->created[] = $db->configKeyName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue