fixed index validator to allow expressions in the optional where clause

This commit is contained in:
Gani Georgiev committed 2026-09-05 22:31:16 +03:00
1 parent 97f9d63a1b
commit dbea21f1b2
10 files changed
+24 -22

No files matched your search

+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) {