mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Merge pull request #1761 from umami-software/bug/um-165-rename-index-fix
add current database filter when querying index
This commit is contained in:
commit
58a380d6e7
1 changed files with 2 additions and 1 deletions
|
|
@ -68,7 +68,8 @@ CREATE PROCEDURE `UmamiRenameIndexIfExists`(
|
||||||
INFORMATION_SCHEMA.STATISTICS
|
INFORMATION_SCHEMA.STATISTICS
|
||||||
WHERE
|
WHERE
|
||||||
TABLE_NAME = @tableName
|
TABLE_NAME = @tableName
|
||||||
AND INDEX_NAME = @currentIndexName;
|
AND INDEX_NAME = @currentIndexName
|
||||||
|
AND TABLE_SCHEMA = database();
|
||||||
|
|
||||||
SET @query = CONCAT(
|
SET @query = CONCAT(
|
||||||
'ALTER TABLE `', @tableName, '` RENAME INDEX `', @currentIndexName, '` TO `', @newIndexName, '`;'
|
'ALTER TABLE `', @tableName, '` RENAME INDEX `', @currentIndexName, '` TO `', @newIndexName, '`;'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue