mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc: explain how to use domain types properly (#4134)
This commit is contained in:
5
examples/domaintypes/schema.sql
Normal file
5
examples/domaintypes/schema.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE DOMAIN us_postal_code AS TEXT
|
||||
CHECK(
|
||||
VALUE ~ '^\d{5}$'
|
||||
OR VALUE ~ '^\d{5}-\d{4}$'
|
||||
);
|
||||
Reference in New Issue
Block a user