-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for TEXT column type to CreateTables() #34
Comments
Yes! +1 To add text is very necessary! |
There needs to be more control over types. I made a suggestion in this issue here https://github.com/coopernurse/gorp/issues/58. My biggest issue is some of my types need to be BINARY. For now I think I'm going to create tables manually. |
👍 |
2 similar comments
+1 |
+1 |
seems an elementary feature... issue opened a year ago... no comment from project owner... doesn't look good? |
I fully agree with the comments above. For me, working only with Postgresql databases it is impossible to take GORM seriously without this feature. |
The If you'd like to extend the default dialect, one option is to add an optional field to PostgresDialect that specifies the cutoff for maxsize that would dictate whether to use a text field. But this is a slippery slope that may further reinforce the idea that the provided dialect implementations are intended to satisfy all use cases. |
I think a really easy change would be to add a new attribute to ColumnMap to override the SQL type. Since TEXT, for example, can be used just like varchar anyway, that could work out in this case. I mean we can override the column size, so why not the column type, too? |
Currently CreateTables() interprets all string properties as varchar. Please add support for annotating that the column should be type TEXT instead.
The text was updated successfully, but these errors were encountered: