Remove redundant database objects

This reduces database connections and improves performance.
This commit is contained in:
FusionPBX
2024-08-05 14:22:17 -06:00
committed by GitHub
parent 00c803f53e
commit cd1cc70044
40 changed files with 0 additions and 169 deletions

View File

@@ -27,7 +27,6 @@
if ($domains_processed == 1) {
//create a view for call block
$database = new database;
$database->execute("DROP VIEW view_call_block;", null);
$sql = "CREATE VIEW view_call_block AS ( \n";
$sql .= " select c.domain_uuid, call_block_uuid, c.call_block_direction, c.extension_uuid, c.call_block_name, c.call_block_country_code, \n";
@@ -37,13 +36,11 @@ if ($domains_processed == 1) {
$sql .= " left join v_extensions as e \n";
$sql .= " on c.extension_uuid = e.extension_uuid \n";
$sql .= "); \n";
$database = new database;
$database->execute($sql, null);
unset($sql);
//set call blocks to inbound if no direction defined
$sql = "update v_call_block set call_block_direction = 'inbound' where call_block_direction is null ";
$database = new database;
$database->execute($sql, null);
unset($sql);