From 6f37951e02ed7b7fd56749267164a0f4297b9cab Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 12 Jan 2026 14:17:10 -0700 Subject: [PATCH] Move update_indexes into the schema method --- core/upgrade/index.php | 3 --- core/upgrade/upgrade.php | 3 --- core/upgrade/upgrade_menu.php | 3 --- resources/classes/schema.php | 3 +++ 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/core/upgrade/index.php b/core/upgrade/index.php index 2c064311b7..0652877395 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -152,9 +152,6 @@ $obj = new schema(['database' => $database]); $_SESSION["response"]["schema"] = $obj->schema("html"); message::add($text['message-upgrade_schema'], null, $message_timeout); - - //update database foreign key indexes - $database->update_indexes(); } //process the apps defaults diff --git a/core/upgrade/upgrade.php b/core/upgrade/upgrade.php index 98d4379fe4..b00a011657 100644 --- a/core/upgrade/upgrade.php +++ b/core/upgrade/upgrade.php @@ -235,9 +235,6 @@ echo " ".trim($row)."\n"; } } - - //update database foreign key indexes - $database->update_indexes(); } diff --git a/core/upgrade/upgrade_menu.php b/core/upgrade/upgrade_menu.php index 6351bd329f..b79c5e53f6 100644 --- a/core/upgrade/upgrade_menu.php +++ b/core/upgrade/upgrade_menu.php @@ -353,9 +353,6 @@ function do_upgrade_schema() { //get the database schema put it into an array then compare and update the database as needed. $obj = new schema(); echo $obj->schema('text'); - - //update the database foreign key indexes - $database->update_indexes(); } /** diff --git a/resources/classes/schema.php b/resources/classes/schema.php index 1f510acc13..9d308b4388 100644 --- a/resources/classes/schema.php +++ b/resources/classes/schema.php @@ -649,6 +649,9 @@ class schema { //create views so that alter table statements complete $this->database->views('create'); + //update database foreign key indexes + $this->database->update_indexes(); + //handle response return $response;