feat: regex hint

This commit is contained in:
Abhinav Raut
2025-04-13 19:28:58 +05:30
parent 91372f5339
commit 0254bab266
11 changed files with 54 additions and 21 deletions

View File

@@ -508,9 +508,14 @@ CREATE TABLE custom_attribute_definitions (
values TEXT[] DEFAULT '{}'::TEXT[] NOT NULL,
data_type TEXT NOT NULL,
regex TEXT NULL,
regex_hint TEXT NULL,
CONSTRAINT constraint_custom_attribute_definitions_on_name CHECK (length("name") <= 140),
CONSTRAINT constraint_custom_attribute_definitions_on_description CHECK (length(description) <= 300),
CONSTRAINT constraint_custom_attribute_definitions_on_key CHECK (length(key) <= 140),
CONSTRAINT constraint_custom_attribute_definitions_on_applies_to CHECK (length(applies_to) <= 50),
CONSTRAINT constraint_custom_attribute_definitions_on_data_type CHECK (length(data_type) <= 100),
CONSTRAINT constraint_custom_attribute_definitions_on_regex CHECK (length(regex) <= 1000),
CONSTRAINT constraint_custom_attribute_definitions_on_regex_hint CHECK (length(regex_hint) <= 1000),
CONSTRAINT constraint_custom_attribute_definitions_key_applies_to_unique UNIQUE (key, applies_to)
);