mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-20 13:30:50 +02:00
fixed index validator to allow expressions in the optional where clause
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user