File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -262,15 +262,21 @@ References:
262262- https://openid.net/specs/openid-connect-core-1_0.html#zoneinfo
263263
264264## Data Type: Phone number
265-
265+ Phone numbers are usually stored as E.164.
266266``` sql
267267phone_number VARCHAR (32 ) NOT NULL DEFAULT ' ' ,
268268phone_number_verified BOOLEAN NOT NULL DEFAULT 0 ,
269269```
270+
271+ TL;DR, don't store phone number as bigint, as trailing zeros will break it.
270272References:
271273- https://en.wikipedia.org/wiki/Telephone_numbering_plan
272274- https://boards.straightdope.com/sdmb/showthread.php?t=417024
273275https://stackoverflow.com/questions/723587/whats-the-longest-possible-worldwide-phone-number-i-should-consider-in-sql-varc
276+ - [ Google: Falsehoods Programmers Believe About Phone Numbers] ( https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md )
277+ - https://dba.stackexchange.com/questions/164796/how-do-i-store-phone-numbers-in-postgresql
278+ - https://www.mayerdan.com/programming/2017/06/26/db_phone_types
279+ - [ Twillio: What is E.164?] ( https://www.google.com/search?q=twillio+e164&oq=twillio+e164&aqs=chrome..69i57j0i13.3516j0j4&sourceid=chrome&ie=UTF-8 )
274280
275281## Data Type: Name
276282Longest name (225 characters)
You can’t perform that action at this time.
0 commit comments