X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDatabase%2FDBStructure.php;h=2638bafab767f825d56932ba1bc82697af0b0872;hb=277cd5143361ebc2024cc810740d50be3a93a4cb;hp=2b0e3d1e358966d3768cdfa418b08eb764fb57fd;hpb=5350e0852d718494934252328d17a094fd1bc73e;p=friendica.git diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 2b0e3d1e35..2638bafab7 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -1,6 +1,6 @@ 'TABLES'], ['TABLE_NAME'], ['TABLE_SCHEMA' => DBA::databaseName(), 'TABLE_TYPE' => 'BASE TABLE']); @@ -96,10 +96,10 @@ class DBStructure echo DI::l10n()->t('These tables are not used for friendica and will be deleted when you execute "dbstructure drop -e":') . "\n\n"; } - foreach ($tables as $table) { - if (in_array($table['TABLE_NAME'], $old_tables)) { + foreach ($old_tables as $table) { + if (in_array($table, array_column($tables, 'TABLE_NAME'))) { if ($execute) { - $sql = 'DROP TABLE ' . DBA::quoteIdentifier($table['TABLE_NAME']) . ';'; + $sql = 'DROP TABLE ' . DBA::quoteIdentifier($table) . ';'; echo $sql . "\n"; $result = DBA::e($sql); @@ -107,7 +107,7 @@ class DBStructure self::printUpdateError($sql); } } else { - echo $table['TABLE_NAME'] . "\n"; + echo $table . "\n"; } } }