how to create a column with datatype 'TimeStampWithTimezone' in sails.js v1.0.2 models?

284 views Asked by At

I'm using sails v 1.0.2 and sails-PostgreSQL adapter. I have a model that has a column of date type that saves current time in the format of timestamp with time zone. how should I do it? previously I created my database in pgAdmin statically but now I don't know how to do it in sails

1

There are 1 answers

0
poacher2k On BEST ANSWER

A bit late, but in case anyone else comes across this question, here's how you do it:

dateField: {
    type: 'ref',
    columnType: 'timestamptz'
}