$statement = $this->dbObj->prepareStatement($sql);
$statement->execute($conditions->getParameters());
while ($row = $statement->fetchArray()) {
- $this->tables[$row['TABLE_NAME']][] = $row['CONSTRAINT_NAME'];
+ $tables[$row['TABLE_NAME']][] = $row['CONSTRAINT_NAME'];
}
// handle foreign keys from 3rd party tables
}
// drop foreign keys
- foreach ($this->tables as $tableName => $foreignKeys) {
+ foreach ($tables as $tableName => $foreignKeys) {
foreach ($foreignKeys as $fk) {
$this->dropForeignKey($tableName, $fk);
}
}
// drop tables
- foreach (array_keys($this->tables) as $tableName) {
+ foreach (array_keys($tables) as $tableName) {
$this->dropTable($tableName);
}
}