fixed index validator to allow expressions in the optional where clause

This commit is contained in:
Gani Georgiev
2026-09-05 22:31:16 +03:00
parent 97f9d63a1b
commit dbea21f1b2
10 changed files with 24 additions and 22 deletions
+1 -1
View File
@@ -1667,7 +1667,7 @@ const utils = {
};
const indexRegex =
/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gim;
/\s*create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*?)\)(?:\s*where\s+([\s\S]*?))?\s*$/gim;
const matches = indexRegex.exec((idx || "").trim());
if (matches?.length != 7) {