File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -262,15 +262,21 @@ References:
262
262
- https://openid.net/specs/openid-connect-core-1_0.html#zoneinfo
263
263
264
264
## Data Type: Phone number
265
-
265
+ Phone numbers are usually stored as E.164.
266
266
``` sql
267
267
phone_number VARCHAR (32 ) NOT NULL DEFAULT ' ' ,
268
268
phone_number_verified BOOLEAN NOT NULL DEFAULT 0 ,
269
269
```
270
+
271
+ TL;DR, don't store phone number as bigint, as trailing zeros will break it.
270
272
References:
271
273
- https://en.wikipedia.org/wiki/Telephone_numbering_plan
272
274
- https://boards.straightdope.com/sdmb/showthread.php?t=417024
273
275
https://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 )
274
280
275
281
## Data Type: Name
276
282
Longest name (225 characters)
You can’t perform that action at this time.
0 commit comments