Using other Postgre datatypes
danielreghin opened this issue · 3 comments
danielreghin commented
Is there a way of using other postgre data types than the defaults that comes from using (String, bool, int) dart data types?
For exemple I want to use Date instead of timestamp. Varchar(255) instead text and so on.
I tried to use CustomDataTypes but wihout success.
class DateConverter extends TypeConverter {
const DateConverter() : super('date');
...
}
@UseConverter(DateConverter())
DateTime get dtOpen
schultek commented
I would have suggested the way you wrote, so I don't know right now why it doesnt work. I have to investigate.
danielreghin commented
HI.
I made it work somehow. Did it again, ran build_runner and it worked. I must have made a mistake at the first time.
Not an issue anymore. Thanks.
schultek commented
Cool thanks.