mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Elasticsearch: Support dropping aliases
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
- PostgreSQL: Add SQL operator to select
|
- PostgreSQL: Add SQL operator to select
|
||||||
- PostgreSQL: Hide only partitions, not all inherited tables from menu
|
- PostgreSQL: Hide only partitions, not all inherited tables from menu
|
||||||
- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089)
|
- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089)
|
||||||
|
- Elasticsearch: Support dropping aliases
|
||||||
- Plugins: Methods processList() and killProcess()
|
- Plugins: Methods processList() and killProcess()
|
||||||
|
|
||||||
## Adminer 5.3.0 (released 2025-05-04)
|
## Adminer 5.3.0 (released 2025-05-04)
|
||||||
|
@@ -529,15 +529,18 @@ if (isset($_GET["elastic"])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Drop types
|
function drop_views(array $tables): bool {
|
||||||
* @param list<string> $tables
|
$return = connection()->rootQuery('_aliases', array('actions' => array_map(function ($table) {
|
||||||
*/
|
return array('remove' => array('index' => '*', 'alias' => $table));
|
||||||
|
}, $tables)), 'POST');
|
||||||
|
return $return && !$return['errors'];
|
||||||
|
}
|
||||||
|
|
||||||
function drop_tables(array $tables): bool {
|
function drop_tables(array $tables): bool {
|
||||||
$return = true;
|
$return = true;
|
||||||
foreach ($tables as $table) { //! convert to bulk api
|
foreach ($tables as $table) { //! convert to bulk api
|
||||||
$return = $return && connection()->rootQuery(urlencode($table), null, 'DELETE');
|
$return = $return && connection()->rootQuery(urlencode($table), null, 'DELETE');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user