source: backend/src/main/resources/db.migration/R__custom_domains.sql@ e1f74f6

Last change on this file since e1f74f6 was 20d16ca, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Implement advanced database queries

  • Property mode set to 100644
File size: 383 bytes
Line 
1CREATE DOMAIN embg_format AS TEXT
2 CHECK (VALUE ~ '^\d{13}$');
3
4CREATE DOMAIN email_format AS TEXT
5 CHECK (
6 VALUE ~ '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$'
7 AND LENGTH(VALUE) <= 254
8 );
9
10CREATE DOMAIN phone_number_format AS TEXT
11 CHECK (VALUE ~ '^\+?[\d\s\-().]{7,20}$');
12
13CREATE DOMAIN non_negative_cost AS DECIMAL(12,2)
14 CHECK (VALUE >= 0);
Note: See TracBrowser for help on using the repository browser.