Skip to content

Commit 858eb64

Browse files
committed
fixed the logic in attachment in types
1 parent 880c1b9 commit 858eb64

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

packages/data-types/types/deploy/schemas/public/domains/attachment.sql

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
-- requires: schemas/public/schema
33

44
BEGIN;
5-
CREATE DOMAIN attachment AS jsonb CHECK (
6-
(
7-
jsonb_typeof(VALUE) = 'object'
8-
AND VALUE ?& ARRAY['url', 'mime']
9-
AND VALUE->>'url' ~ '^(https?)://[^\s/$.?#].[^\s]*$'
10-
)
11-
OR (
12-
jsonb_typeof(VALUE) = 'string'
13-
AND VALUE #>> '{}' ~ '^(https?)://[^\s/$.?#].[^\s]*$'
14-
)
15-
);
5+
CREATE DOMAIN attachment AS text CHECK (VALUE ~ '^(https?)://[^\s/$.?#].[^\s]*$');
166
COMMENT ON DOMAIN attachment IS E'@name launchqlInternalTypeAttachment';
177
COMMIT;

0 commit comments

Comments
 (0)