vapor-community/postgresql-driver

Strings are limited to 255 characters

0xTim opened this issue · 2 comments

0xTim commented

When creating fields of type String, the driver translates them to a VARCHAR field of length 255 instead of using the text type available in PostgreSQL. Is there any way to use this type or do you have to specify a large int when preparing the database?

0xTim commented

Closing this as it can be achieved with a .custom field like so:

posts.custom("contents", type: "TEXT")

That seems more of a work-around. There shouldn't be any constraints added in the driver level that preclude standard functionality.