Merge pull request #253 from rudcode/timetz
Add timetz datatype for postgres
This commit is contained in:
commit
257209c3e1
@ -909,6 +909,20 @@ const postgresTypesBase = {
|
|||||||
hasPrecision: false,
|
hasPrecision: false,
|
||||||
hasQuotes: true,
|
hasQuotes: true,
|
||||||
},
|
},
|
||||||
|
TIMETZ: {
|
||||||
|
type: "TIMETZ",
|
||||||
|
checkDefault: (field) => {
|
||||||
|
const specialValues = ["now", "allballs"];
|
||||||
|
return (
|
||||||
|
/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d([+-]\d{2}:\d{2})?$/.test(field.default) ||
|
||||||
|
specialValues.includes(field.default.toLowerCase())
|
||||||
|
);
|
||||||
|
},
|
||||||
|
hasCheck: false,
|
||||||
|
isSized: false,
|
||||||
|
hasPrecision: false,
|
||||||
|
hasQuotes: true,
|
||||||
|
},
|
||||||
TIMESTAMP: {
|
TIMESTAMP: {
|
||||||
type: "TIMESTAMP",
|
type: "TIMESTAMP",
|
||||||
checkDefault: (field) => {
|
checkDefault: (field) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user